blob: cd838af547169a13d642719b493565ea2d1b4bb5 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
import EnableAddonOperator from "../../../../src/content/operators/impls/EnableAddonOperator";
import MockAddonIndicatorClient from "../../mock/MockAddonIndicatorClient";
import MockAddonEnabledRepository from "../../mock/MockAddonEnabledRepository";
import MockConsoleFramePresenter from "./MockConsoleFramePresenter";
describe("EnableAddonOperator", () => {
describe("#run", () => {
it("enabled addon", async () => {
const client = new MockAddonIndicatorClient(false);
const repository = new MockAddonEnabledRepository(false);
const presenter = new MockConsoleFramePresenter(false);
const sut = new EnableAddonOperator(client, repository, presenter);
await sut.run();
expect(client.enabled).toBeTruthy;
expect(repository.enabled).toBeTruthy;
expect(presenter.attached).toBeTruthy;
});
});
});
|