Skip to content

Commit 111ea28

Browse files
authored
fix(wasm): Check for browser bundle existence before running tests (#4074)
As of #4048, it's more likely that one might try to run the full test suite without having built the browser bundle. Since the wasm tests rely on it, this adds a check before they run, along with an error message letting the user know why things aren't working.
1 parent b1ca2eb commit 111ea28

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

packages/wasm/test/integration.test.js

+9
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,15 @@
11
/* global page, window */
2+
const fs = require('fs');
3+
const path = require('path');
4+
25
const HOST = `http://localhost:${process.env.PORT}`;
36

7+
if (!fs.existsSync(path.resolve(__dirname, '../../browser/build/bundle.js'))) {
8+
throw new Error(
9+
'ERROR: No browser bundle found in `packages/browser/build/`. Please run `yarn build` in the browser package before running wasm tests.',
10+
);
11+
}
12+
413
describe('Wasm', () => {
514
it('captured exception should include modified frames and debug_meta attribute', async () => {
615
await page.goto(HOST);

0 commit comments

Comments
 (0)