Catch more SSR issues and improve compat tests (#353)

This will cause the build to fail, as this will catch an SSR issue, which will be fixed after merging #369
This commit is contained in:
Aria 2023-01-04 21:03:47 +02:00 committed by GitHub
parent 71f08e171a
commit 718beb4d7b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
52 changed files with 2404 additions and 686 deletions

View file

@ -3,25 +3,25 @@ describe('tightJsonStringify', () => {
it('matches a series of expectations', () => {
expect(tightJsonStringify({a: 1, b: 2, c: {y: 4, z: 745}}))
.toMatchInlineSnapshot(`
"{ \\"a\\": 1,
\\"b\\": 2,
\\"c\\": {
\\"y\\": 4,
\\"z\\": 745 } }"
"{ "a": 1,
"b": 2,
"c": {
"y": 4,
"z": 745 } }"
`)
expect(tightJsonStringify(true)).toMatchInlineSnapshot(`"true"`)
expect(tightJsonStringify('Already a string')).toMatchInlineSnapshot(
`"\\"Already a string\\""`,
`""Already a string""`,
)
expect(tightJsonStringify({a: 1, b: {c: [1, 2, {d: 4}], e: 8}}))
.toMatchInlineSnapshot(`
"{ \\"a\\": 1,
\\"b\\": {
\\"c\\": [
"{ "a": 1,
"b": {
"c": [
1,
2,
{ \\"d\\": 4 } ],
\\"e\\": 8 } }"
{ "d": 4 } ],
"e": 8 } }"
`)
})
})