Skip to content

Commit a1b8a74

Browse files
committed
Also for browser tests.
1 parent 7b6e86b commit a1b8a74

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

test/testFixtures.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ export function callCCTest(srcPath: string, transform: string) {
3535

3636
export function browserTest(srcPath: string, transform: string) {
3737
const testName = `${srcPath} (${transform}) (in-browser)`;
38+
const basename = path.basename(srcPath, '.js')
3839

3940
// Skip tests we know we can't handle
4041
if ( srcPath.indexOf("dart") >= 0 ||
@@ -44,8 +45,8 @@ export function browserTest(srcPath: string, transform: string) {
4445
}
4546

4647
it(testName, () => {
47-
const { name: dstPath } = tmp.fileSync({ dir: ".", postfix: ".js" });
48-
const { name: htmlPath } = tmp.fileSync({ dir: ".", postfix: ".html" });
48+
const { name: dstPath } = tmp.fileSync({ dir: ".", postfix: `${basename}.js` });
49+
const { name: htmlPath } = tmp.fileSync({ dir: ".", postfix: `${basename}.html` });
4950
execSync(`./bin/compile --transform ${transform} ${srcPath} ${dstPath}`);
5051
execSync(`./bin/webpack ${dstPath} ${htmlPath}`);
5152
execSync(`./bin/browser ${htmlPath} --yield 1000 --env chrome`);

0 commit comments

Comments
 (0)