1 | var test = require('ava')
|
2 | var getCss = require('..')
|
3 |
|
4 | var css = 'h1 { color: tomato; }'
|
5 | var html = '<style>' + css + '</style><h1>Hello, world!</h1>'
|
6 |
|
7 | test('should correctly extract css from raw html', async (t) => {
|
8 | t.plan(1)
|
9 |
|
10 | const result = await getCss('http://example.com/', null, html)
|
11 |
|
12 | t.deepEqual(css, result.css)
|
13 | })
|