@@ -10,6 +10,7 @@ let { readOutputFile, appendToInputFile, writeInputFile, removeFile } = require(
10
10
} )
11
11
12
12
let PORT = 1337
13
+ let OUTPUT_REGEX = / i n d e x [ . - ] [ \w - ] + \. c s s $ /
13
14
14
15
async function fetchCSS ( ) {
15
16
let response = await fetch ( `http://localhost:${ PORT } /index.css` , {
@@ -34,7 +35,7 @@ describe('static build', () => {
34
35
env : { NODE_ENV : 'production' , NO_COLOR : '1' } ,
35
36
} )
36
37
37
- expect ( await readOutputFile ( / i n d e x . \w + \. c s s $ / ) ) . toIncludeCss (
38
+ expect ( await readOutputFile ( OUTPUT_REGEX ) ) . toIncludeCss (
38
39
css `
39
40
.font-bold {
40
41
font-weight : 700 ;
@@ -76,7 +77,7 @@ describe('static build', () => {
76
77
} )
77
78
78
79
if ( env . ENGINE === 'stable' ) {
79
- expect ( await readOutputFile ( / i n d e x . \w + \. c s s $ / ) ) . toIncludeCss (
80
+ expect ( await readOutputFile ( OUTPUT_REGEX ) ) . toIncludeCss (
80
81
css `
81
82
.bg-primary {
82
83
--tw-bg-opacity : 1 ;
@@ -87,7 +88,7 @@ describe('static build', () => {
87
88
}
88
89
89
90
if ( env . ENGINE === 'oxide' ) {
90
- expect ( await readOutputFile ( / i n d e x . \w + \. c s s $ / ) ) . toIncludeCss (
91
+ expect ( await readOutputFile ( OUTPUT_REGEX ) ) . toIncludeCss (
91
92
css `
92
93
.bg-primary {
93
94
background-color : black;
@@ -132,7 +133,7 @@ describe('static build', () => {
132
133
} )
133
134
134
135
if ( env . ENGINE === 'stable' ) {
135
- expect ( await readOutputFile ( / i n d e x . \w + \. c s s $ / ) ) . toIncludeCss (
136
+ expect ( await readOutputFile ( OUTPUT_REGEX ) ) . toIncludeCss (
136
137
css `
137
138
.bg-primary {
138
139
--tw-bg-opacity : 1 ;
@@ -143,7 +144,7 @@ describe('static build', () => {
143
144
}
144
145
145
146
if ( env . ENGINE === 'oxide' ) {
146
- expect ( await readOutputFile ( / i n d e x . \w + \. c s s $ / ) ) . toIncludeCss (
147
+ expect ( await readOutputFile ( OUTPUT_REGEX ) ) . toIncludeCss (
147
148
css `
148
149
.bg-primary {
149
150
background-color : black;
0 commit comments