mirror of
https://github.com/vitest-dev/vitest.git
synced 2026-01-18 16:31:32 +00:00
20 lines
605 B
TypeScript
20 lines
605 B
TypeScript
import { normalize } from 'node:path'
|
|
import { describe, expect, test } from 'vitest'
|
|
import { runVitest } from '../../test-utils'
|
|
|
|
async function run() {
|
|
return await runVitest({
|
|
include: ['tests/fixtures/console.test.ts'],
|
|
setupFiles: ['setupFiles/console-setup.ts'],
|
|
})
|
|
}
|
|
|
|
describe('setup files console', () => {
|
|
test('print stdout and stderr correctly', async () => {
|
|
const { stdout, stderr } = await run()
|
|
const filepath = normalize('setupFiles/console-setup.ts')
|
|
expect(stdout).toContain(`stdout | ${filepath}`)
|
|
expect(stderr).toContain(`stderr | ${filepath}`)
|
|
})
|
|
})
|