aboutsummaryrefslogtreecommitdiff
path: root/test/content/presenters/NavigationPresenter.test.ts
diff options
context:
space:
mode:
Diffstat (limited to 'test/content/presenters/NavigationPresenter.test.ts')
-rw-r--r--test/content/presenters/NavigationPresenter.test.ts13
1 files changed, 7 insertions, 6 deletions
diff --git a/test/content/presenters/NavigationPresenter.test.ts b/test/content/presenters/NavigationPresenter.test.ts
index 8d003c4..0e51242 100644
--- a/test/content/presenters/NavigationPresenter.test.ts
+++ b/test/content/presenters/NavigationPresenter.test.ts
@@ -1,9 +1,10 @@
-import { NavigationPresenterImpl } from "../../../src/content/presenters/NavigationPresenter";
-import { expect } from "chai";
+/**
+ * @jest-environment jsdom
+ */
-describe("NavigationPresenterImpl", function () {
- this.timeout(5000);
+import { NavigationPresenterImpl } from "../../../src/content/presenters/NavigationPresenter";
+describe("NavigationPresenterImpl", () => {
let sut: NavigationPresenterImpl;
const testRel = (done: () => void, rel: string, html: string) => {
@@ -12,7 +13,7 @@ describe("NavigationPresenterImpl", function () {
document.body.innerHTML = html;
method();
setTimeout(() => {
- expect(document.location.hash).to.equal(`#${rel}`);
+ expect(document.location.hash).toEqual(`#${rel}`);
done();
}, 0);
};
@@ -21,7 +22,7 @@ describe("NavigationPresenterImpl", function () {
const testNext = (html: string) => (done: () => void) =>
testRel(done, "next", html);
- before(() => {
+ beforeEach(() => {
sut = new NavigationPresenterImpl();
});