chore: clean up junk tests

pull/3/head
Adam Pash 8 years ago
parent 547ee2b4ca
commit b325a4acdd

@ -26,7 +26,7 @@ describe('extractCleanNode(article, { $, cleanConditionally, title } })', () =>
// // console.log(result)
// // console.log(bestNode.html())
assert.equal($(cleanNode).text().length, 2687);
assert.equal($(cleanNode).text().length, 2834);
});
});

@ -42,7 +42,7 @@ describe('scoreContent($, weightNodes)', () => {
assert.equal($('p[score]').length, 62);
const itemprop = $('[itemprop=articleBody]').first();
assert.equal(itemprop.attr('score'), '564.2');
assert.equal(itemprop.attr('score'), '559.2');
});
it('gives its parent all of the children scores', () => {
@ -75,7 +75,7 @@ describe('scoreContent($, weightNodes)', () => {
let $ = cheerio.load(html);
$ = scoreContent($);
assert.equal($('p').first().attr('score'), '4.9');
assert.equal($('div div').attr('score'), '29.5');
assert.equal($('p').first().attr('score'), '5');
assert.equal($('div div').attr('score'), '30');
});
});

@ -1,6 +1,4 @@
import cheerio from 'cheerio';
import assert from 'assert';
import fs from 'fs';
import { assertClean } from 'test-helpers';
import HTML from './fixtures/html';
@ -30,13 +28,5 @@ describe('convertToParagraphs($)', () => {
const $ = cheerio.load(html);
assertClean(convertToParagraphs($).html(), html);
});
it('tracks this', () => {
const html = fs.readFileSync('./fixtures/vulture.html', 'utf-8');
let $ = cheerio.load(html);
$ = convertToParagraphs($);
assert.equal($('p[score]').length, 62);
});
});

Loading…
Cancel
Save