mirror of
https://github.com/vitest-dev/vitest.git
synced 2025-12-08 18:26:03 +00:00
22 lines
667 B
TypeScript
22 lines
667 B
TypeScript
import { expect, test } from 'vitest'
|
|
import { instances, runBrowserTests } from './utils'
|
|
|
|
const testNames = Object.keys(import.meta.glob('../fixtures/expect-dom/*.test.ts', {
|
|
eager: false,
|
|
})).map(path => path.slice('../fixtures/expect-dom/'.length))
|
|
|
|
test('expect-dom works correctly', async () => {
|
|
const { stderr, stdout } = await runBrowserTests({
|
|
root: './fixtures/expect-dom',
|
|
})
|
|
|
|
expect(stderr).toReportNoErrors()
|
|
instances.forEach(({ browser }) => {
|
|
testNames.forEach((name) => {
|
|
expect(stdout).toReportPassedTest(name, browser)
|
|
})
|
|
})
|
|
|
|
expect(stdout).toContain(`Test Files ${instances.length * testNames.length} passed`)
|
|
})
|