From 1561836390ef1a4da85d10271cd2177614f47253 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ari=20Perkki=C3=B6?= Date: Wed, 4 May 2022 19:00:10 +0000 Subject: [PATCH] test(inline-snapshot): add test for nested object --- test/core/test/snapshot-inline.test.ts | 13 +++++++++++++ 1 file changed, 13 insertions(+) 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', () => {