mirror of
https://github.com/vitest-dev/vitest.git
synced 2025-12-08 18:26:03 +00:00
24 lines
519 B
TypeScript
24 lines
519 B
TypeScript
// fix https://github.com/vitest-dev/vitest/issues/6690
|
|
|
|
import { expect, test } from 'vitest'
|
|
import { runBrowserTests } from './utils'
|
|
|
|
test('setup file imports the same modules', async () => {
|
|
const { stderr, ctx } = await runBrowserTests(
|
|
{
|
|
root: './fixtures/setup-file',
|
|
},
|
|
)
|
|
|
|
expect(stderr).toBe('')
|
|
expect(
|
|
Object.fromEntries(
|
|
ctx.state.getFiles().map(f => [f.name, f.result.state]),
|
|
),
|
|
).toMatchInlineSnapshot(`
|
|
{
|
|
"module-equality.test.ts": "pass",
|
|
}
|
|
`)
|
|
})
|