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
458 B
JavaScript
19 lines
458 B
JavaScript
8 years ago
|
import assert from 'assert'
|
||
|
import cheerio from 'cheerio'
|
||
|
|
||
8 years ago
|
import HTML from './fixtures/html'
|
||
8 years ago
|
import { assertClean } from './test-helpers'
|
||
|
|
||
|
import { rewriteTopLevel } from './index'
|
||
|
|
||
|
describe('rewriteTopLevel(node, $)', () => {
|
||
|
it("turns html and body tags into divs", () => {
|
||
|
let $ = cheerio.load(HTML.rewriteHTMLBody.before)
|
||
|
|
||
|
let result = rewriteTopLevel($('html').first(), $)
|
||
|
assertClean(result.html(), HTML.rewriteHTMLBody.after)
|
||
|
})
|
||
|
})
|
||
|
|
||
|
|