Skip to content

Commit c9874b8

Browse files
committed
Split tests
1 parent 8c2f031 commit c9874b8

File tree

9 files changed

+60
-23
lines changed

9 files changed

+60
-23
lines changed
+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
/* Correct syntax: input::placeholder */
2+
input:placeholder {
3+
color: red;
4+
}

Diff for: test/development/css-error/app/css-error/page.js renamed to test/development/css-error/app/css-error-1/page.js

+2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
'use client'
22

3+
import './error-1.css'
4+
35
export default function Page() {
46
return (
57
<>
+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
.rowContainer {
2+
&.header {
3+
/* Correct syntax: &.darktheme */
4+
&:darktheme {
5+
border-bottom-color: var(--accents-2);
6+
}
7+
}
8+
}

Diff for: test/development/css-error/app/css-error-2/page.js

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
'use client'
2+
3+
import './error-2.css'
4+
5+
export default function Page() {
6+
return (
7+
<>
8+
<div></div>
9+
</>
10+
)
11+
}
+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
.rowContainer {
2+
/* Correct syntax: &.global(.dark-theme) */
3+
&:global(.dark-theme) & {
4+
background: linear-gradient(transparent 0%, rgba(0, 0, 0, 0.5) 100%);
5+
}
6+
}

Diff for: test/development/css-error/app/css-error-3/page.js

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
'use client'
2+
3+
import './error-3.css'
4+
5+
export default function Page() {
6+
return (
7+
<>
8+
<div></div>
9+
</>
10+
)
11+
}

Diff for: test/development/css-error/app/global.css

-19
This file was deleted.

Diff for: test/development/css-error/app/layout.js

-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
'use client'
22

3-
import './global.css'
4-
53
export default function Layout({ children }) {
64
return <>{children}</>
75
}

Diff for: test/development/css-error/index.test.ts

+18-2
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,24 @@ describe('app dir - css', () => {
1919
;(process.env.TURBOPACK ? describe : describe.skip)(
2020
'error handling',
2121
() => {
22-
it('should report human-readable error message for css', async () => {
23-
const browser = await next.browser('/css-error')
22+
it('should report human-readable error message for wrong pseudo class', async () => {
23+
const browser = await next.browser('/css-error-1')
24+
25+
const source = await getRedboxSource(browser)
26+
27+
expect(source).toMatchInlineSnapshot()
28+
})
29+
30+
it('should report human-readable error message for wrong global class', async () => {
31+
const browser = await next.browser('/css-error-2')
32+
33+
const source = await getRedboxSource(browser)
34+
35+
expect(source).toMatchInlineSnapshot()
36+
})
37+
38+
it('should report human-readable error message for wrong css module', async () => {
39+
const browser = await next.browser('/css-error-3')
2440

2541
const source = await getRedboxSource(browser)
2642

0 commit comments

Comments
 (0)