Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Fix test again
  • Loading branch information
srmagura committed Jul 9, 2022
commit a3eb7ecea5f81f283ce102bb604296c80b61b5da
20 changes: 3 additions & 17 deletions packages/react/__tests__/rehydration.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,8 @@ beforeEach(() => {
test("cache created in render doesn't cause a hydration mismatch", () => {
safeQuerySelector('body').innerHTML = [
'<div id="root">',
'<style data-emotion="stl 1pdkrhd">.stl-1pdkrhd-App {color: hotpink;}</style>',
'<div class="stl-1pdkrhd">Hello world!</div>',
'<style data-emotion="stl 168r6j">.stl-1pdkrhd {color: hotpink;}</style>',
'<div class="stl-168r6j">Hello world!</div>',
'</div>'
].join('')

Expand Down Expand Up @@ -87,21 +87,7 @@ test("cache created in render doesn't cause a hydration mismatch", () => {
container: safeQuerySelector('#root')
})

expect((console.error: any).mock.calls).toMatchInlineSnapshot(`
[
[
"Warning: Prop \`%s\` did not match. Server: %s Client: %s%s",
"className",
""stl-1pdkrhd"",
""stl-168r6j"",
"
in div (created by EmotionCssPropInternal)
in EmotionCssPropInternal (created by App)
in Wrapper (created by App)
in App",
],
]
`)
expect((console.error: any).mock.calls).toMatchInlineSnapshot(`[]`)
expect((console.warn: any).mock.calls).toMatchInlineSnapshot(`[]`)
})

Expand Down