From a12c10ab49292db487bce9ca595f566a24c7257d Mon Sep 17 00:00:00 2001 From: Hiroshi Ogawa Date: Mon, 9 Feb 2026 09:49:33 +0900 Subject: [PATCH 1/2] test: update snapshot --- test/snapshots/test/soft.test.ts | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/test/snapshots/test/soft.test.ts b/test/snapshots/test/soft.test.ts index 8692ab4fad3a..0b58c86c83ad 100644 --- a/test/snapshots/test/soft.test.ts +++ b/test/snapshots/test/soft.test.ts @@ -61,7 +61,7 @@ test('soft', async () => { Received: ""--snap-1-edit--"" ❯ basic.test.ts:4:34 - 2| + 2| 3| test('toMatchSnapshot', () => { 4| expect.soft('--snap-1-edit--').toMatchSnapshot() | ^ @@ -82,7 +82,7 @@ test('soft', async () => { 5| expect.soft('--snap-2-edit--').toMatchSnapshot() | ^ 6| }) - 7| + 7| ⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯[2/6]⎯ @@ -93,7 +93,7 @@ test('soft', async () => { Received: "--file-1-edit--" ❯ basic.test.ts:9:3 - 7| + 7| 8| test('toMatchFileSnapshot', async () => { 9| await expect.soft('--file-1-edit--').toMatchFileSnapshot('./__snapsh… | ^ @@ -114,7 +114,7 @@ test('soft', async () => { 10| await expect.soft('--file-2-edit--').toMatchFileSnapshot('./__snapsh… | ^ 11| }) - 12| + 12| ⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯[4/6]⎯ @@ -125,7 +125,7 @@ test('soft', async () => { Received: "[Error: --error-1-edit--]" ❯ basic.test.ts:14:62 - 12| + 12| 13| test('toThrowErrorMatchingSnapshot', () => { 14| expect.soft(() => { throw new Error('--error-1-edit--') }).toThrowEr… | ^ @@ -146,7 +146,7 @@ test('soft', async () => { 15| expect.soft(() => { throw new Error('--error-2-edit--') }).toThrowEr… | ^ 16| }) - 17| + 17| ⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯[6/6]⎯ From dad309b1a958780d9b41e27894d4e5697d44de23 Mon Sep 17 00:00:00 2001 From: Hiroshi Ogawa Date: Mon, 9 Feb 2026 11:52:13 +0900 Subject: [PATCH 2/2] fix: fix expect/src/utils bundled in vitest --- packages/expect/src/index.ts | 1 + packages/vitest/src/integrations/snapshot/chai.ts | 3 +-- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/expect/src/index.ts b/packages/expect/src/index.ts index b1e92628fee2..ce2f5acdbac4 100644 --- a/packages/expect/src/index.ts +++ b/packages/expect/src/index.ts @@ -24,4 +24,5 @@ export { addCustomEqualityTesters } from './jest-matcher-utils' export * from './jest-utils' export { getState, setState } from './state' export * from './types' +export * from './utils' export * as chai from 'chai' diff --git a/packages/vitest/src/integrations/snapshot/chai.ts b/packages/vitest/src/integrations/snapshot/chai.ts index 14d34cf6ea8b..908f1061d616 100644 --- a/packages/vitest/src/integrations/snapshot/chai.ts +++ b/packages/vitest/src/integrations/snapshot/chai.ts @@ -1,13 +1,12 @@ import type { Assertion, ChaiPlugin } from '@vitest/expect' import type { Test } from '@vitest/runner' -import { equals, iterableEquality, subsetEquality } from '@vitest/expect' +import { createAssertionMessage, equals, iterableEquality, recordAsyncExpect, subsetEquality, wrapAssertion } from '@vitest/expect' import { getNames } from '@vitest/runner/utils' import { addSerializer, SnapshotClient, stripSnapshotIndentation, } from '@vitest/snapshot' -import { createAssertionMessage, recordAsyncExpect, wrapAssertion } from '../../../../expect/src/utils' let _client: SnapshotClient