separate content

This commit is contained in:
Shin'ya Ueoka 2017-10-08 15:04:55 +09:00
parent d886d7de29
commit 39fb540037
17 changed files with 24 additions and 24 deletions

View file

@ -0,0 +1,9 @@
<!DOCTYPE html>
<html>
<body>
<a href='#' >link</a>
<a href='#' style='display:none'>invisible 1</a>
<a href='#' style='visibility:hidden'>invisible 2</a>
<i>not link<i>
</body>
</html>

View file

@ -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);
});
});
});