Something went wrong. Try again.
[READ-ONLY] Mirror of https://github.com/vitest-dev/vitest. Next generation testing framework powered by Vite. vitest.dev
test testing-tools vite
Something went wrong. Try again.
422 B · 15 lines
JavaScript
12345678910111213141516import { expect, test } from 'vitest'import { state } from './module-state.js'
const extended = test.extend({ fixture: async ({}, use) => { await use('fixture') },})
extended('keeps a heavy module graph alive', async ({ fixture }) => { const dynamic = await import('./module-state.js') expect(dynamic.state).toBe(state) expect(fixture).toBe('fixture') document.body.innerHTML = '<div>payload</div>'})