You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
19 lines
436 B
JavaScript
19 lines
436 B
JavaScript
import assert from 'assert';
|
|
|
|
import scoreCapLinks from './score-cap-links';
|
|
|
|
describe('scoreCapLinks(linkData)', () => {
|
|
it('returns -65 if cap link with next link text', () => {
|
|
const linkData = 'foo next Last page';
|
|
|
|
assert.equal(scoreCapLinks(linkData), -65);
|
|
});
|
|
|
|
it('returns 0 if does not match a cap link', () => {
|
|
const linkData = 'foo bar WOW GREAT';
|
|
|
|
assert.equal(scoreCapLinks(linkData), 0);
|
|
});
|
|
});
|
|
|