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
469 B
JavaScript
19 lines
469 B
JavaScript
import assert from 'assert';
|
|
|
|
import scoreExtraneousLinks from './score-extraneous-links';
|
|
|
|
describe('scoreExtraneousLinks(href)', () => {
|
|
it('returns -25 if link matches extraneous text', () => {
|
|
const url = 'http://example.com/email-link';
|
|
|
|
assert.equal(scoreExtraneousLinks(url), -25);
|
|
});
|
|
|
|
it('returns 0 if does not match extraneous text', () => {
|
|
const url = 'http://example.com/asdf';
|
|
|
|
assert.equal(scoreExtraneousLinks(url), 0);
|
|
});
|
|
});
|
|
|