From e9863299abf9498c67660e8a97c70ddb090baffe Mon Sep 17 00:00:00 2001 From: Shin'ya Ueoka Date: Sun, 17 Sep 2017 12:52:24 +0900 Subject: implement go-parent command --- test/content/navigates.test.js | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'test') 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 = 'xprevx go to prev'; @@ -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; + }); + }); }); -- cgit v1.2.3