Use TSyringe on content script
This commit is contained in:
parent
71f3a1ea2d
commit
1666e626b0
35 changed files with 398 additions and 433 deletions
|
@ -40,7 +40,7 @@ describe('AddonEnabledUseCase', () => {
|
|||
beforeEach(() => {
|
||||
repository = new MockAddonEnabledRepository(true);
|
||||
indicator = new MockAddonIndicatorClient(false);
|
||||
sut = new AddonEnabledUseCase({ repository, indicator });
|
||||
sut = new AddonEnabledUseCase(indicator, repository);
|
||||
});
|
||||
|
||||
describe('#enable', () => {
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
import ClipboardRepository from '../../../src/content/repositories/ClipboardRepository';
|
||||
import { SettingRepositoryImpl } from '../../../src/content/repositories/SettingRepository';
|
||||
import TabsClient from '../../../src/content/client/TabsClient';
|
||||
import MockConsoleClient from '../mock/MockConsoleClient';
|
||||
import ClipboardUseCase from '../../../src/content/usecases/ClipboardUseCase';
|
||||
|
@ -43,7 +44,12 @@ describe('ClipboardUseCase', () => {
|
|||
repository = new MockClipboardRepository();
|
||||
client = new MockTabsClient();
|
||||
consoleClient = new MockConsoleClient();
|
||||
sut = new ClipboardUseCase({ repository, client: client, consoleClient });
|
||||
sut = new ClipboardUseCase(
|
||||
repository,
|
||||
new SettingRepositoryImpl(),
|
||||
client,
|
||||
consoleClient
|
||||
);
|
||||
});
|
||||
|
||||
describe('#yankCurrentURL', () => {
|
||||
|
|
|
@ -71,7 +71,7 @@ describe('FindUseCase', () => {
|
|||
presenter = new MockFindPresenter();
|
||||
client = new MockFindClient();
|
||||
consoleClient = new MockConsoleClient();
|
||||
sut = new FindUseCase({ repository, presenter, client, consoleClient });
|
||||
sut = new FindUseCase(presenter, repository, client, consoleClient);
|
||||
});
|
||||
|
||||
describe('#startFind', () => {
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
import MarkRepository from '../../../src/content/repositories/MarkRepository';
|
||||
import { SettingRepositoryImpl } from '../../../src/content/repositories/SettingRepository';
|
||||
import MarkUseCase from '../../../src/content/usecases/MarkUseCase';
|
||||
import MarkClient from '../../../src/content/client/MarkClient';
|
||||
import MockConsoleClient from '../mock/MockConsoleClient';
|
||||
|
@ -54,9 +55,13 @@ describe('MarkUseCase', () => {
|
|||
client = new MockMarkClient();
|
||||
consoleClient = new MockConsoleClient();
|
||||
scrollPresenter = new MockScrollPresenter();
|
||||
sut = new MarkUseCase({
|
||||
repository, client, consoleClient, scrollPresenter,
|
||||
});
|
||||
sut = new MarkUseCase(
|
||||
scrollPresenter,
|
||||
client,
|
||||
repository,
|
||||
new SettingRepositoryImpl(),
|
||||
consoleClient,
|
||||
);
|
||||
});
|
||||
|
||||
describe('#set', () => {
|
||||
|
|
|
@ -56,7 +56,7 @@ describe('AddonEnabledUseCase', () => {
|
|||
|
||||
repository = new MockSettingRepository();
|
||||
client = new MockSettingClient(testSettings);
|
||||
sut = new SettingUseCase({ repository, client });
|
||||
sut = new SettingUseCase(repository, client);
|
||||
});
|
||||
|
||||
describe('#reload', () => {
|
||||
|
|
Reference in a new issue