Skip to content

Commit 7b6e86b

Browse files
committed
Get basename for test name.
1 parent 00a9554 commit 7b6e86b

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

test/testFixtures.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,8 @@ export function callCCTest(srcPath: string, transform: string) {
2020
}
2121

2222
it(testName, () => {
23-
const { name: dstPath } = tmp.fileSync({ dir: ".", postfix: `${srcPath}.js` });
23+
const basename = path.basename(srcPath, '.js')
24+
const { name: dstPath } = tmp.fileSync({ dir: ".", postfix: `${basename}.js` });
2425
execSync(`./bin/compile --transform ${transform} ${srcPath} ${dstPath}`);
2526
try {
2627
execSync(`./bin/run ${dstPath} --yield 1`, { timeout: 30000 });

0 commit comments

Comments
 (0)