add follow tests
This commit is contained in:
parent
d4d54ca496
commit
c50f463bc1
3 changed files with 35 additions and 1 deletions
|
@ -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);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
|
Reference in a new issue