From a191b8fa81472dbe34cce674a1f4f71fe77d4499 Mon Sep 17 00:00:00 2001 From: Hiroshi Ogawa Date: Wed, 14 Aug 2024 09:32:19 +0900 Subject: [PATCH] test: tweak --- .../inline-snapshop-inside-loop-update-none.test.ts | 1 - ...all.test.ts => inline-snapshop-inside-loop.test.ts} | 0 test/cli/test/__snapshots__/fails.test.ts.snap | 10 +--------- test/cli/test/fails.test.ts | 2 +- 4 files changed, 2 insertions(+), 11 deletions(-) delete mode 100644 test/cli/fixtures/fails/inline-snapshop-inside-loop-update-none.test.ts rename test/cli/fixtures/fails/{inline-snapshop-inside-loop-update-all.test.ts => inline-snapshop-inside-loop.test.ts} (100%) diff --git a/test/cli/fixtures/fails/inline-snapshop-inside-loop-update-none.test.ts b/test/cli/fixtures/fails/inline-snapshop-inside-loop-update-none.test.ts deleted file mode 100644 index b4667ae1a50b..000000000000 --- a/test/cli/fixtures/fails/inline-snapshop-inside-loop-update-none.test.ts +++ /dev/null @@ -1 +0,0 @@ -import "./inline-snapshop-inside-loop-update-all.test"; diff --git a/test/cli/fixtures/fails/inline-snapshop-inside-loop-update-all.test.ts b/test/cli/fixtures/fails/inline-snapshop-inside-loop.test.ts similarity index 100% rename from test/cli/fixtures/fails/inline-snapshop-inside-loop-update-all.test.ts rename to test/cli/fixtures/fails/inline-snapshop-inside-loop.test.ts diff --git a/test/cli/test/__snapshots__/fails.test.ts.snap b/test/cli/test/__snapshots__/fails.test.ts.snap index ce479e774d48..a1fefe9ff820 100644 --- a/test/cli/test/__snapshots__/fails.test.ts.snap +++ b/test/cli/test/__snapshots__/fails.test.ts.snap @@ -31,7 +31,7 @@ Error: InlineSnapshot cannot be used inside of test.each or describe.each Error: InlineSnapshot cannot be used inside of test.each or describe.each" `; -exports[`should fail inline-snapshop-inside-loop-update-all.test.ts > inline-snapshop-inside-loop-update-all.test.ts 1`] = ` +exports[`should fail inline-snapshop-inside-loop.test.ts > inline-snapshop-inside-loop.test.ts 1`] = ` "Error: toMatchInlineSnapshot cannot be called multiple times at the same location. Error: toMatchInlineSnapshot cannot be called multiple times at the same location. Error: toMatchInlineSnapshot cannot be called multiple times at the same location. @@ -39,14 +39,6 @@ Error: toMatchInlineSnapshot cannot be called multiple times at the same locatio Error: toMatchInlineSnapshot cannot be called multiple times at the same location." `; -exports[`should fail inline-snapshop-inside-loop-update-none.test.ts > inline-snapshop-inside-loop-update-none.test.ts 1`] = ` -"Error: toMatchInlineSnapshot cannot be called multiple times at the same location. -Error: toMatchInlineSnapshot cannot be called multiple times at the same location. -Error: Snapshot \`fail 2.2 1\` mismatched -Error: toMatchInlineSnapshot cannot be called multiple times at the same location. -Error: toMatchInlineSnapshot cannot be called multiple times at the same location." -`; - exports[`should fail mock-import-proxy-module.test.ts > mock-import-proxy-module.test.ts 1`] = `"Error: There are some problems in resolving the mocks API."`; exports[`should fail nested-suite.test.ts > nested-suite.test.ts 1`] = `"AssertionError: expected true to be false // Object.is equality"`; diff --git a/test/cli/test/fails.test.ts b/test/cli/test/fails.test.ts index 0bb19ad73288..aee55dd286e8 100644 --- a/test/cli/test/fails.test.ts +++ b/test/cli/test/fails.test.ts @@ -10,7 +10,7 @@ const files = await fg('**/*.test.ts', { cwd: root, dot: true }) it.each(files)('should fail %s', async (file) => { const { stderr } = await runVitest({ root, - update: file === 'inline-snapshop-inside-loop-update-all.test.ts' ? true : undefined, + update: file === 'inline-snapshop-inside-loop.test.ts' ? true : undefined, }, [file]) expect(stderr).toBeTruthy()