Skip to content

Commit 02b0d50

Browse files
committed
fix tests
1 parent 7e4bfd7 commit 02b0d50

3 files changed

Lines changed: 19 additions & 21 deletions

File tree

Lines changed: 13 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,15 @@
1-
import { createNextDescribe } from 'e2e-utils'
1+
import { nextTestSetup } from 'e2e-utils'
22

3-
createNextDescribe(
4-
'cssnano-colormin',
5-
{
3+
describe('cssnano-colormin', () => {
4+
const { next } = nextTestSetup({
65
files: __dirname,
7-
},
8-
({ next }) => {
9-
it('should not minify rgb colors to hsla', async () => {
10-
const browser = await next.browser('/')
11-
let color = await browser.eval(
12-
`window.getComputedStyle(document.querySelector('.foo')).backgroundColor`
13-
)
14-
expect(color).toBe('rgba(143, 101, 98, 0.43)')
15-
})
16-
}
17-
)
6+
})
7+
8+
it('should not minify rgb colors to hsla', async () => {
9+
const browser = await next.browser('/')
10+
let color = await browser.eval(
11+
`window.getComputedStyle(document.querySelector('.foo')).backgroundColor`
12+
)
13+
expect(color).toBe('rgba(143, 101, 98, 0.43)')
14+
})
15+
})

test/integration/css-features/test/css-modules.test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@ describe('CSS Modules: Importing Invalid Global CSS', () => {
178178

179179
expect(
180180
cssContent.replace(/\/\*.*?\*\//g, '').trim()
181-
).toMatchInlineSnapshot(`".styles_blk__480DC{color:#000}"`)
181+
).toMatchInlineSnapshot(`".styles_blk__480DC{color:#000000}"`)
182182
})
183183
}
184184
)

test/integration/css-modules/test/index.test.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -470,7 +470,7 @@ describe('Valid Nested CSS Module Usage from within node_modules', () => {
470470
expect(
471471
cssContent.replace(/\/\*.*?\*\//g, '').trim()
472472
).toMatchInlineSnapshot(
473-
`".other2_other2__dYPgz{color:red}.other3_other3__7hgUE{color:violet}.other_className__OA8dV{background:red;color:#ff0}.example_subClass__m6Tyy{background:blue}"`
473+
`".other2_other2__dYPgz{color:red}.other3_other3__7hgUE{color:violet}.other_className__OA8dV{background:red;color:yellow}.example_subClass__m6Tyy{background:blue}"`
474474
)
475475
}
476476
})
@@ -528,7 +528,7 @@ describe('CSS Module Composes Usage (Basic)', () => {
528528
expect(
529529
cssContent.replace(/\/\*.*?\*\//g, '').trim()
530530
).toMatchInlineSnapshot(
531-
`".index_className__jjcZ1{background:red;color:#ff0}.index_subClass__eDzaW{background:blue}"`
531+
`".index_className__jjcZ1{background:red;color:yellow}.index_subClass__eDzaW{background:blue}"`
532532
)
533533
}
534534
})
@@ -584,7 +584,7 @@ describe('CSS Module Composes Usage (External)', () => {
584584
expect(
585585
cssContent.replace(/\/\*.*?\*\//g, '').trim()
586586
).toMatchInlineSnapshot(
587-
`".other_className__eZV4M{background:red;color:#ff0}.index_subClass__eDzaW{background:blue}"`
587+
`".other_className__eZV4M{background:red;color:yellow}.index_subClass__eDzaW{background:blue}"`
588588
)
589589
}
590590
})
@@ -648,7 +648,7 @@ describe('Dynamic Route CSS Module Usage', () => {
648648
} else {
649649
expect(
650650
cssContent.replace(/\/\*.*?\*\//g, '').trim()
651-
).toMatchInlineSnapshot(`"._post__home__yRmHz{background:red}"`)
651+
).toMatchInlineSnapshot(`"._post__home__yRmHz{background:#f00}"`)
652652
}
653653
})
654654
}
@@ -717,7 +717,7 @@ describe('Catch-all Route CSS Module Usage', () => {
717717
expect(
718718
cssContent.replace(/\/\*.*?\*\//g, '').trim()
719719
).toMatchInlineSnapshot(
720-
`".___post__home__e4zfx{background:red}.__55css_home__r8Rnq{color:green}"`
720+
`".___post__home__e4zfx{background:#f00}.__55css_home__r8Rnq{color:green}"`
721721
)
722722
}
723723
})

0 commit comments

Comments
 (0)