blob: 379ce4473fa605c003fbe0abb597dddb2e641f3f (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
import NavigateRootOperator from "../../../../src/background/operators/impls/NavigateRootOperator";
import MockTabPresenter from "../../mock/MockTabPresenter";
describe("NavigateRootOperator", () => {
describe("#run", () => {
it("opens root directory in the URL", async () => {
const tabPresenter = new MockTabPresenter();
await tabPresenter.create("https://example.com/search?q=apple#top");
const sut = new NavigateRootOperator(tabPresenter);
await sut.run();
const url = (await tabPresenter.getCurrent()).url;
expect(url).toEqual("https://example.com");
});
});
});
|