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.
17 lines
410 B
JavaScript
17 lines
410 B
JavaScript
8 years ago
|
import cheerio from 'cheerio';
|
||
|
|
||
|
import { assertClean } from 'test-helpers';
|
||
|
|
||
|
import HTML from './fixtures/html';
|
||
|
import { markToKeep } from './index';
|
||
|
|
||
|
describe('markToKeep($)', () => {
|
||
|
it('marks elements that should be kept', () => {
|
||
|
const $ = cheerio.load(HTML.marksYouTube.before);
|
||
|
|
||
|
const result = markToKeep($('*').first(), $);
|
||
|
assertClean(result.html(), HTML.marksYouTube.after);
|
||
|
});
|
||
|
});
|
||
|
|