separate content
This commit is contained in:
parent
d886d7de29
commit
39fb540037
17 changed files with 24 additions and 24 deletions
9
test/content/components/follow.html
Normal file
9
test/content/components/follow.html
Normal 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>
|
15
test/content/components/follow.test.js
Normal file
15
test/content/components/follow.test.js
Normal 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);
|
||||
});
|
||||
});
|
||||
});
|
Reference in a new issue