(html, done)
| 6 | const html = null |
| 7 | |
| 8 | function test (html, done) { |
| 9 | posthtml() |
| 10 | .use(tree => { |
| 11 | tree.walk(node => node) |
| 12 | tree.match(/(.+)/, node => node) |
| 13 | |
| 14 | tree.messages.push({ |
| 15 | type: 'warning', |
| 16 | message: 'tree is empty' |
| 17 | }) |
| 18 | |
| 19 | return tree |
| 20 | }) |
| 21 | .process(html, { skipParse: true }) |
| 22 | .then(result => { |
| 23 | expect('').to.eql(result.html) |
| 24 | |
| 25 | done() |
| 26 | }) |
| 27 | .catch(error => { |
| 28 | done(error) |
| 29 | }) |
| 30 | } |
| 31 | |
| 32 | describe('Process', () => { |
| 33 | it('should not throw on empty tree', done => { |
no test coverage detected
searching dependent graphs…