diff options
author | Shin'ya Ueoka <ueokande@i-beam.org> | 2020-05-02 17:25:56 +0900 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-05-02 17:25:56 +0900 |
commit | 5df0537bcf65a341e79852b1b30379c73318529c (patch) | |
tree | aee5efe52412855f620cb514a13a2c14373f27b7 /test/content/usecases/AddonEnabledUseCase.test.ts | |
parent | 685f2b7b69218b06b5bb676069e35f79c5048c9b (diff) | |
parent | 75abd90ecb8201ad845b266f96220d8adfe19b2d (diff) |
Merge pull request #749 from ueokande/qa-0.28
QA 0.28
Diffstat (limited to 'test/content/usecases/AddonEnabledUseCase.test.ts')
-rw-r--r-- | test/content/usecases/AddonEnabledUseCase.test.ts | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/test/content/usecases/AddonEnabledUseCase.test.ts b/test/content/usecases/AddonEnabledUseCase.test.ts index 8c15099..885da83 100644 --- a/test/content/usecases/AddonEnabledUseCase.test.ts +++ b/test/content/usecases/AddonEnabledUseCase.test.ts @@ -1,7 +1,7 @@ -import AddonEnabledRepository from '../../../src/content/repositories/AddonEnabledRepository'; -import AddonEnabledUseCase from '../../../src/content/usecases/AddonEnabledUseCase'; -import AddonIndicatorClient from '../../../src/content/client/AddonIndicatorClient'; -import { expect } from 'chai'; +import AddonEnabledRepository from "../../../src/content/repositories/AddonEnabledRepository"; +import AddonEnabledUseCase from "../../../src/content/usecases/AddonEnabledUseCase"; +import AddonIndicatorClient from "../../../src/content/client/AddonIndicatorClient"; +import { expect } from "chai"; class MockAddonEnabledRepository implements AddonEnabledRepository { private enabled: boolean; @@ -28,11 +28,11 @@ class MockAddonIndicatorClient implements AddonIndicatorClient { async setEnabled(enabled: boolean): Promise<void> { this.enabled = enabled; - return + return; } } -describe('AddonEnabledUseCase', () => { +describe("AddonEnabledUseCase", () => { let repository: MockAddonEnabledRepository; let indicator: MockAddonIndicatorClient; let sut: AddonEnabledUseCase; @@ -43,8 +43,8 @@ describe('AddonEnabledUseCase', () => { sut = new AddonEnabledUseCase(indicator, repository); }); - describe('#enable', () => { - it('store and indicate as enabled', async() => { + describe("#enable", () => { + it("store and indicate as enabled", async () => { await sut.enable(); expect(repository.get()).to.be.true; @@ -52,8 +52,8 @@ describe('AddonEnabledUseCase', () => { }); }); - describe('#disable', async() => { - it('store and indicate as disabled', async() => { + describe("#disable", async () => { + it("store and indicate as disabled", async () => { await sut.disable(); expect(repository.get()).to.be.false; @@ -61,8 +61,8 @@ describe('AddonEnabledUseCase', () => { }); }); - describe('#toggle', () => { - it('toggled enabled and disabled', async() => { + describe("#toggle", () => { + it("toggled enabled and disabled", async () => { repository.set(true); await sut.toggle(); @@ -78,8 +78,8 @@ describe('AddonEnabledUseCase', () => { }); }); - describe('#getEnabled', () => { - it('returns current addon enabled', () => { + describe("#getEnabled", () => { + it("returns current addon enabled", () => { repository.set(true); expect(sut.getEnabled()).to.be.true; |