File tree Expand file tree Collapse file tree 2 files changed +16
-3
lines changed Expand file tree Collapse file tree 2 files changed +16
-3
lines changed Original file line number Diff line number Diff line change 1414 " get-css"
1515 ],
1616 "scripts" : {
17- "test" : " eslint ./src ./test && ava"
17+ "test" : " ava && npm run lint" ,
18+ "ava" : " ava" ,
19+ "lint" : " eslint ./src ./test"
1820 },
1921 "files" : [
2022 " src"
3739 "eslintConfig" : {
3840 "extends" : " @bartveneman/eslint-config-bv"
3941 }
40- }
42+ }
Original file line number Diff line number Diff line change @@ -40,6 +40,17 @@ test('it finds css in a <style> tag - HTML', async t => {
4040 t . snapshot ( actual )
4141} )
4242
43+ // This is an issue with chrome-aws-lambda, so let's make sure
44+ // it doesn't happen here too.
45+ test ( 'it reports CSS in a <style> tag in HTML only once' , async t => {
46+ const actual = await extractCss ( server . url + '/style-tag-html.html' )
47+
48+ const firstOccurence = actual . indexOf ( '.fixture' )
49+ const lastOccurence = actual . lastIndexOf ( '.fixture' )
50+
51+ t . is ( firstOccurence , lastOccurence )
52+ } )
53+
4354test ( 'it finds css in a <style> tag - JS' , async t => {
4455 const actual = await extractCss ( server . url + '/style-tag-js.html' )
4556
@@ -84,7 +95,7 @@ test('it finds inline styles - JS', async t => {
8495 t . snapshot ( actual )
8596} )
8697
87- test ( 'it yields an array of entries when the `origins` option equals `include`' , async t => {
98+ test ( 'it returns an array of entries when the `origins` option equals `include`' , async t => {
8899 const actual = await extractCss ( server . url + '/kitchen-sink.html' , {
89100 origins : 'include'
90101 } )
You can’t perform that action at this time.
0 commit comments