mirror of
https://github.com/vitest-dev/vitest.git
synced 2025-12-08 18:26:03 +00:00
10 lines
269 B
TypeScript
10 lines
269 B
TypeScript
import { readFileSync } from 'node:fs';
|
|
import { resolve } from 'node:path';
|
|
import { expect, test } from 'vitest';
|
|
|
|
const filepath = resolve(import.meta.dirname, './text.txt');
|
|
|
|
test('basic', () => {
|
|
expect(readFileSync(filepath, 'utf-8')).toBe('hello world\n');
|
|
})
|