Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
N
next.js
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Alex
next.js
Commits
be4aed48
Commit
be4aed48
authored
Aug 12, 2025
by
Niklas Mischkulnig
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
WIP Pure test
parent
5bbd5ddf
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
92 additions
and
0 deletions
+92
-0
home.module.css
test/e2e/app-dir/css-modules-pure/app/home.module.css
+16
-0
layout.tsx
test/e2e/app-dir/css-modules-pure/app/layout.tsx
+13
-0
page.tsx
test/e2e/app-dir/css-modules-pure/app/page.tsx
+10
-0
pure.module.css
test/e2e/app-dir/css-modules-pure/app/pure.module.css
+9
-0
css-modules-pure-no-check.test.ts
...pp-dir/css-modules-pure/css-modules-pure-no-check.test.ts
+37
-0
next.config.ts
test/e2e/app-dir/css-modules-pure/next.config.ts
+7
-0
No files found.
test/e2e/app-dir/css-modules-pure/app/home.module.css
0 → 100644
View file @
be4aed48
div
{
width
:
20px
;
}
:global
(
.foo
)
{
width
:
20px
;
}
[
foo
=
'bar'
]
{
width
:
20px
;
}
div
,
.foo
{
width
:
20px
;
}
test/e2e/app-dir/css-modules-pure/app/layout.tsx
0 → 100644
View file @
be4aed48
import
type
{
ReactNode
}
from
'react'
export
default
function
RootLayout
({
children
,
}:
Readonly
<
{
children
:
ReactNode
}
>
)
{
return
(
<
html
lang=
"en"
>
<
body
>
{
children
}
</
body
>
</
html
>
)
}
test/e2e/app-dir/css-modules-pure/app/page.tsx
0 → 100644
View file @
be4aed48
import
styles
from
'./home.module.css'
import
pure
from
'./pure.module.css'
export
default
function
Home
()
{
return
(
<
div
id=
"my-div"
className=
{
`${styles.home} ${pure.root} global`
}
>
<
div
>
This text should be bold
</
div
>
</
div
>
)
}
test/e2e/app-dir/css-modules-pure/app/pure.module.css
0 → 100644
View file @
be4aed48
.root
{
color
:
red
;
}
:not
(
:global
(
.dark-theme
))
{
.root
{
color
:
blue
;
}
}
test/e2e/app-dir/css-modules-pure/css-modules-pure-no-check.test.ts
0 → 100644
View file @
be4aed48
import
{
nextTestSetup
}
from
'e2e-utils'
import
cheerio
from
'cheerio'
describe
(
'css-modules-pure-no-check'
,
()
=>
{
const
{
isNextStart
,
next
}
=
nextTestSetup
({
files
:
__dirname
,
})
it
(
'should apply styles correctly'
,
async
()
=>
{
const
browser
=
await
next
.
browser
(
'/'
)
const
elementWithGlobalStyles
=
await
browser
.
elementByCss
(
'#my-div'
)
.
getComputedCss
(
'font-weight'
)
expect
(
elementWithGlobalStyles
).
toBe
(
'700'
)
})
if
(
isNextStart
)
{
it
(
'should have emitted a CSS file'
,
async
()
=>
{
const
html
=
await
next
.
render
(
'/'
)
const
$html
=
cheerio
.
load
(
html
)
const
cssLink
=
$html
(
'link[rel="stylesheet"]'
)
expect
(
cssLink
.
length
).
toBe
(
1
)
const
cssHref
=
cssLink
[
0
].
attribs
[
'href'
]
const
res
=
await
next
.
fetch
(
cssHref
)
const
cssCode
=
await
res
.
text
()
expect
(
cssCode
).
toInclude
(
`.global{font-weight:700}`
)
expect
(
cssCode
).
toInclude
(
`::view-transition-old(root){animation-duration:.3s}`
)
})
}
})
test/e2e/app-dir/css-modules-pure/next.config.ts
0 → 100644
View file @
be4aed48
import
type
{
NextConfig
}
from
'next'
const
nextConfig
:
NextConfig
=
{
/* config options here */
}
export
default
nextConfig
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment