aboutsummaryrefslogtreecommitdiff
path: root/test/content/follow.test.js
diff options
context:
space:
mode:
authorShin'ya Ueoka <ueokande@i-beam.org>2017-08-21 21:01:29 +0900
committerShin'ya Ueoka <ueokande@i-beam.org>2017-08-21 21:32:02 +0900
commitc50f463bc12da7e3a5de490b714b4ff1ea8d3e56 (patch)
treeb0b731a8bbc00fb2c330497c3c088f506a08dd57 /test/content/follow.test.js
parentd4d54ca4963ef4de3e913746cdee87656dc02229 (diff)
add follow tests
Diffstat (limited to 'test/content/follow.test.js')
-rw-r--r--test/content/follow.test.js11
1 files changed, 11 insertions, 0 deletions
diff --git a/test/content/follow.test.js b/test/content/follow.test.js
index eb3d679..fd4f0bc 100644
--- a/test/content/follow.test.js
+++ b/test/content/follow.test.js
@@ -11,4 +11,15 @@ describe('Follow class', () => {
expect(Follow.codeChars([])).to.be.equal('');
});
});
+
+ describe('#getTargetElements', () => {
+ beforeEach(() => {
+ document.body.innerHTML = __html__['test/content/follow.html'];
+ });
+
+ it('returns visible links', () => {
+ let links = Follow.getTargetElements(window.document);
+ expect(links).to.have.lengthOf(1);
+ });
+ });
});