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 14
14
" get-css"
15
15
],
16
16
"scripts" : {
17
- "test" : " eslint ./src ./test && ava"
17
+ "test" : " ava && npm run lint" ,
18
+ "ava" : " ava" ,
19
+ "lint" : " eslint ./src ./test"
18
20
},
19
21
"files" : [
20
22
" src"
37
39
"eslintConfig" : {
38
40
"extends" : " @bartveneman/eslint-config-bv"
39
41
}
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 => {
40
40
t . snapshot ( actual )
41
41
} )
42
42
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
+
43
54
test ( 'it finds css in a <style> tag - JS' , async t => {
44
55
const actual = await extractCss ( server . url + '/style-tag-js.html' )
45
56
@@ -84,7 +95,7 @@ test('it finds inline styles - JS', async t => {
84
95
t . snapshot ( actual )
85
96
} )
86
97
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 => {
88
99
const actual = await extractCss ( server . url + '/kitchen-sink.html' , {
89
100
origins : 'include'
90
101
} )
You can’t perform that action at this time.
0 commit comments