diff --git a/test/core/test/snapshot-inline.test.ts b/test/core/test/snapshot-inline.test.ts index 5c357d9c37f7..9b99cf072b18 100644 --- a/test/core/test/snapshot-inline.test.ts +++ b/test/core/test/snapshot-inline.test.ts @@ -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', () => {