mirror of
https://github.com/hanzoai/vitest.git
synced 2026-09-24 17:04:25 +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');
|
|
})
|