mirror of
https://gitee.com/kekingcn/file-online-preview.git
synced 2026-03-14 05:03:49 +08:00
test(e2e): fix preflight fixture scope and path handling
This commit is contained in:
@@ -1,8 +1,10 @@
|
||||
import fs from 'node:fs';
|
||||
import path from 'node:path';
|
||||
import { execFileSync } from 'node:child_process';
|
||||
import { fileURLToPath } from 'node:url';
|
||||
|
||||
const fixturesDir = path.resolve(process.cwd(), 'tests/e2e/fixtures');
|
||||
const __dirname = path.dirname(fileURLToPath(import.meta.url));
|
||||
const fixturesDir = path.resolve(__dirname, '..', 'fixtures');
|
||||
fs.mkdirSync(fixturesDir, { recursive: true });
|
||||
|
||||
const write = (name, content) => fs.writeFileSync(path.join(fixturesDir, name), content);
|
||||
|
||||
Reference in New Issue
Block a user