Skip to content

Commit f921bbb

Browse files
committed
refactor(linter/plugins): import named in tests
1 parent c13ada6 commit f921bbb

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

apps/oxlint/test/e2e.test.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
1-
import path from 'node:path';
1+
import { dirname, join as pathJoin } from 'node:path';
22

33
import { describe, expect, it } from 'vitest';
44

55
import { execa } from 'execa';
66

7-
const PACKAGE_ROOT_PATH = path.dirname(import.meta.dirname);
8-
const CLI_PATH = path.join(PACKAGE_ROOT_PATH, 'dist/cli.js');
7+
const PACKAGE_ROOT_PATH = dirname(import.meta.dirname);
8+
const CLI_PATH = pathJoin(PACKAGE_ROOT_PATH, 'dist/cli.js');
99

1010
async function runOxlintWithoutPlugins(cwd: string, args: string[] = []) {
1111
return await execa('node', [CLI_PATH, ...args], {
12-
cwd: path.join(PACKAGE_ROOT_PATH, cwd),
12+
cwd: pathJoin(PACKAGE_ROOT_PATH, cwd),
1313
reject: false,
1414
});
1515
}

0 commit comments

Comments
 (0)