aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/content/navigates.test.js12
1 files changed, 9 insertions, 3 deletions
diff --git a/test/content/navigates.test.js b/test/content/navigates.test.js
index 21c2a23..cf20435 100644
--- a/test/content/navigates.test.js
+++ b/test/content/navigates.test.js
@@ -2,9 +2,6 @@ import { expect } from "chai";
import * as navigates from '../../src/content/navigates';
describe('navigates module', () => {
- beforeEach(() => {
- });
-
describe('#linkPrev', () => {
it('clicks prev link by text content', (done) => {
document.body.innerHTML = '<a href="#dummy">xprevx</a> <a href="#prev">go to prev</a>';
@@ -45,6 +42,15 @@ describe('navigates module', () => {
}, 0);
});
});
+
+ describe('#parent', () => {
+ // NOTE: not able to test location
+ it('removes hash', () => {
+ window.location.hash = "#section-1";
+ navigates.parent(window);
+ expect(document.location.hash).to.be.empty;
+ });
+ });
});