Skip to content

Commit

Permalink
Update test/development/app-dir/experimental-lightningcss/experimenta…
Browse files Browse the repository at this point in the history
…l-lightningcss.test.ts

Co-authored-by: Leah <github.leah@hrmny.sh>
  • Loading branch information
kdy1 and ForsakenHarmony committed Nov 20, 2023
1 parent 6d982ac commit bb486d2
Showing 1 changed file with 13 additions and 19 deletions.
Original file line number Diff line number Diff line change
@@ -1,22 +1,16 @@
import { createNextDescribe } from 'e2e-utils'
import { nextTestSetup } from 'e2e-utils'
import { describeVariants as describe } from 'next-test-utils'

createNextDescribe(
'experimental-lightningcss',
{
describe.each(['turbo'])('experimental-lightningcss', () => {
const { next } = nextTestSetup({
files: __dirname,
},
({ next }) => {
})

it('should support css modules', async () => {
// Recommended for tests that check HTML. Cheerio is a HTML parser that has a jQuery like API.
;(process.env.TURBOPACK ? describe : describe.skip)(
'with it enabled',
() => {
it('should support css modules', async () => {
const $ = await next.render$('/')
expect($('p').text()).toBe('hello world')
// swc_css does not include `-module` in the class name, while lightningcss does.
expect($('p').attr('class')).toBe('style-module__hlQ3RG__blue')
})
}
)
}
)
const $ = await next.render$('/')
expect($('p').text()).toBe('hello world')
// swc_css does not include `-module` in the class name, while lightningcss does.
expect($('p').attr('class')).toBe('style-module__hlQ3RG__blue')
})
})

0 comments on commit bb486d2

Please sign in to comment.