From 39fb5400370b818760dc7bcfe42e74b2512a840d Mon Sep 17 00:00:00 2001 From: Shin'ya Ueoka Date: Sun, 8 Oct 2017 15:04:55 +0900 Subject: separate content --- test/content/components/follow.test.js | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 test/content/components/follow.test.js (limited to 'test/content/components/follow.test.js') diff --git a/test/content/components/follow.test.js b/test/content/components/follow.test.js new file mode 100644 index 0000000..9c00c79 --- /dev/null +++ b/test/content/components/follow.test.js @@ -0,0 +1,15 @@ +import { expect } from "chai"; +import FollowComponent from 'content/components/follow'; + +describe('FollowComponent', () => { + describe('#getTargetElements', () => { + beforeEach(() => { + document.body.innerHTML = __html__['test/content/components/follow.html']; + }); + + it('returns visible links', () => { + let links = FollowComponent.getTargetElements(window.document); + expect(links).to.have.lengthOf(1); + }); + }); +}); -- cgit v1.2.3