[READ-ONLY] Mirror of https://github.com/vitest-dev/vitest. Next generation testing framework powered by Vite. vitest.dev
test testing-tools vite
12

Configure Feed

Select the types of activity you want to include in your feed.

test: fix vite 8 stack trace snapshot (#9747)

authored by

Hiroshi Ogawa and committed by
GitHub
(Feb 26, 2026, 9:51 AM +0100) 5e1f6f9f e5aeced2

+35 -15
+35 -15
test/browser/specs/errors.test.ts
··· 1 1 import path from 'pathe' 2 2 import { expect, test } from 'vitest' 3 + import { rolldownVersion } from 'vitest/node' 3 4 import { buildTestProjectTree } from '../../test-utils' 4 5 import { instances, runBrowserTests, runInlineBrowserTests } from './utils' 5 6 ··· 163 164 164 165 for (const [name, tree] of Object.entries(projectTree)) { 165 166 if (name === 'webkit') { 166 - expect(tree).toMatchInlineSnapshot(` 167 - { 168 - "basic.test.ts": { 169 - "fail": [ 170 - { 171 - "message": "this is test dependency error", 172 - "stacks": [ 173 - "throwDepError at ../../../../node_modules/.pnpm/<normalized>/node_modules/test-dep-error/index.js:2:18", 174 - " at basic.test.ts:5:16", 175 - ], 176 - }, 177 - ], 178 - }, 179 - } 180 - `) 167 + if (rolldownVersion) { 168 + expect(tree).toMatchInlineSnapshot(` 169 + { 170 + "basic.test.ts": { 171 + "fail": [ 172 + { 173 + "message": "this is test dependency error", 174 + "stacks": [ 175 + "throwDepError at ../../../../node_modules/.pnpm/<normalized>/node_modules/test-dep-error/index.js:2:18", 176 + " at basic.test.ts:5:2", 177 + ], 178 + }, 179 + ], 180 + }, 181 + } 182 + `) 183 + } 184 + else { 185 + expect(tree).toMatchInlineSnapshot(` 186 + { 187 + "basic.test.ts": { 188 + "fail": [ 189 + { 190 + "message": "this is test dependency error", 191 + "stacks": [ 192 + "throwDepError at ../../../../node_modules/.pnpm/<normalized>/node_modules/test-dep-error/index.js:2:18", 193 + " at basic.test.ts:5:16", 194 + ], 195 + }, 196 + ], 197 + }, 198 + } 199 + `) 200 + } 181 201 } 182 202 else { 183 203 expect(tree).toMatchInlineSnapshot(`