Skip to content

Commit b87996a

Browse files
authored
chore(build): give each bundling test its own tmpdir (#791)
This *might* fix flakiness like this: [2021/04/19 11:53:57.707] 1) compile generateBundle [2021/04/19 11:53:57.707] does not attempt to load ES6 modules because parcel cannot handle them properly: [2021/04/19 11:53:57.707] Error: ENOENT: no such file or directory, open 'Z:\data\mci\b2b62ed7d54f2bcd3c5e2ddd5846c7d9\src\packages\tmp\test-build-1618833168859-0.6650505642822344\a.js'
1 parent 6fa9ae3 commit b87996a

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

packages/build/src/compile/generate-bundle.spec.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,12 @@ const execFile = promisify(childProcess.execFile);
1010

1111
describe('compile generateBundle', function() {
1212
this.timeout(60_000);
13-
const tmpdir = path.resolve(
14-
__dirname, '..', '..', '..', 'tmp', `test-build-${Date.now()}-${Math.random()}`
15-
);
13+
let tmpdir: string;
1614

1715
beforeEach(async() => {
16+
tmpdir = path.resolve(
17+
__dirname, '..', '..', '..', 'tmp', `test-build-${Date.now()}-${Math.random()}`
18+
);
1819
await fs.mkdir(tmpdir, { recursive: true });
1920
});
2021

0 commit comments

Comments
 (0)