Skip to content

Commit

Permalink
test(inline-snapshot): add test for nested object
Browse files Browse the repository at this point in the history
  • Loading branch information
AriPerkkio committed May 4, 2022
1 parent ba85bad commit 1561836
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions test/core/test/snapshot-inline.test.ts
Expand Up @@ -67,6 +67,19 @@ test('throwing inline snapshots', () => {
"error": "omega",
}
`)

expect(() => {
// eslint-disable-next-line no-throw-literal
throw { some: { nested: { error: 'object' } } }
}).toThrowErrorMatchingInlineSnapshot(`
{
"some": {
"nested": {
"error": "object",
},
},
}
`)
})

test('properties inline snapshot', () => {
Expand Down

0 comments on commit 1561836

Please sign in to comment.