Skip to content

Commit

Permalink
Update test refs
Browse files Browse the repository at this point in the history
  • Loading branch information
kdy1 committed Jan 22, 2024
1 parent b25ebff commit 5f9013f
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions test/development/pages-dir/client-navigation/rendering.ts
Original file line number Diff line number Diff line change
Expand Up @@ -226,15 +226,15 @@ export default function (next: NextInstance, render, fetch, ctx) {
const styleId = $('#blue-box').attr('class')
const style = $('style')

expect(style.text().includes(`p.${styleId}{color:blue`)).toBeTruthy()
expect(style.text().includes(`p.${styleId}{color:#00f`)).toBeTruthy()
})

test('renders styled jsx external', async () => {
const $ = await get$('/styled-jsx-external')
const styleId = $('#blue-box').attr('class')
const style = $('style')

expect(style.text().includes(`p.${styleId}{color:blue`)).toBeTruthy()
expect(style.text().includes(`p.${styleId}{color:#00f`)).toBeTruthy()
})

test('renders properties populated asynchronously', async () => {
Expand Down
4 changes: 2 additions & 2 deletions test/e2e/app-dir/rsc-basic/rsc-basic.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -343,7 +343,7 @@ createNextDescribe(
expect(head).toMatch(/{color:(\s*)hotpink;?}/) // styled-jsx/css

// from styled-components
expect(head).toMatch(/{color:(\s*)blue;?}/)
expect(head).toMatch(/{color:(\s*)#00f;?}/)
})

it('should render initial styles of css-in-js in edge SSR correctly', async () => {
Expand All @@ -355,7 +355,7 @@ createNextDescribe(
expect(head).toMatch(/{color:(\s*)hotpink;?}/) // styled-jsx/css

// from styled-components
expect(head).toMatch(/{color:(\s*)blue;?}/)
expect(head).toMatch(/{color:(\s*)#00f;?}/)
})

it('should render css-in-js suspense boundary correctly', async () => {
Expand Down
2 changes: 1 addition & 1 deletion test/e2e/streaming-ssr/index.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ createNextDescribe(

it('should render styled-jsx styles in streaming', async () => {
const html = await renderViaHTTP(next.url, '/')
expect(html).toContain('color:blue')
expect(html).toContain('color:#00f')
})

it('should redirect paths without trailing-slash and render when slash is appended', async () => {
Expand Down
2 changes: 1 addition & 1 deletion test/integration/amphtml/test/index.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@ describe('AMP Usage', () => {
const html = await renderViaHTTP(appPort, '/styled?amp=1')
const $ = cheerio.load(html)
expect($('style[amp-custom]').first().text()).toMatch(
/div.jsx-[a-zA-Z0-9]{1,}{color:red}span.jsx-[a-zA-Z0-9]{1,}{color:blue}body{background-color:green}/
/div.jsx-[a-zA-Z0-9]{1,}{color:red}span.jsx-[a-zA-Z0-9]{1,}{color:#00f}body{background-color:green}/
)
})

Expand Down

0 comments on commit 5f9013f

Please sign in to comment.