MCPcopy
hub / github.com/posthtml/posthtml / test

Function test

test/options.js:8–17  ·  view source on GitHub ↗
(html, done)

Source from the content-addressed store, hash-verified

6const input = '<div class="button"><rect /><div class="button__text">Text</div></div>'
7
8function test (html, done) {
9 const options = { singleTags: ['rect'], closingSingleTag: 'slash' }
10 posthtml()
11 .process(html, options)
12 .then(result => {
13 expect(input).to.eql(result.html)
14 done()
15 })
16 .catch(error => done(error))
17}
18
19describe('Set options', () => {
20 it('html equal', done => {

Callers 1

options.jsFile · 0.70

Calls 1

processMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…