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.
mercury-parser/src/utils/dom/mark-to-keep.test.js

17 lines
410 B
JavaScript

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);
});
});