Skip to content

Commit

Permalink
test(options): if tree not object
Browse files Browse the repository at this point in the history
  • Loading branch information
Scrum committed Feb 9, 2018
1 parent 3fd9548 commit dcdb3e7
Showing 1 changed file with 28 additions and 0 deletions.
28 changes: 28 additions & 0 deletions test/options.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,34 @@ describe('Set options', function () {
})
})

describe('Skip html parsing & ', function () {
var options = { skipParse: true }

it('use number tree.', function (done) {
var tree = 123456789
expect(posthtml()
.process(tree, options)
.then(function (result) {
expect('123456789').to.eql(result.html)
done()
})
.catch(function (error) { return done(error) })
)
})

it('use string tree.', function (done) {
var tree = '123456789'
expect(posthtml()
.process(tree, options)
.then(function (result) {
expect('123456789').to.eql(result.html)
done()
})
.catch(function (error) { return done(error) })
)
})
})

describe('Skip html parsing & use tree from options.', function () {
var options = { singleTags: ['rect'], closingSingleTag: 'slash' }
var tree = [
Expand Down

0 comments on commit dcdb3e7

Please sign in to comment.