Skip to content

Commit 3586b49

Browse files
committed
Document code, update README.
1 parent 8aa54db commit 3586b49

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

packages/integration-tests/README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,9 @@ To filter tests by their title:
5656

5757
You can refer to [Playwright documentation](https://playwright.dev/docs/test-cli) for other CLI options.
5858

59+
You can set env variable `PW_BUNDLE` to set specific `browser` and `tracing` build or bundle to test against.
60+
Available options: `esm`, `dist`, `bundle`, `bundle_min`, `bundle_es6`, `bundle_es6_min`
61+
5962
### Troubleshooting
6063

6164
Apart from [Playwright-specific issues](https://playwright.dev/docs/troubleshooting), below are common issues that might occur while writing tests for Sentry Browser SDK.

packages/integration-tests/utils/generatePage.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,11 @@ import webpackConfig from '../webpack.config';
99
const PACKAGE_PATH = '../../packages';
1010

1111
const bundleKey = process.env.PW_BUNDLE;
12+
13+
// `esm` and `dist` builds are modules that can be imported / aliased by webpack
1214
const useCompiledModule = bundleKey && (bundleKey === 'esm' || bundleKey === 'dist');
15+
16+
// bundles need to be injected into HTML before Sentry initialization.
1317
const useBundle = bundleKey && !useCompiledModule;
1418

1519
const BUNDLE_PATHS: Record<string, Record<string, string>> = {
@@ -26,6 +30,7 @@ const BUNDLE_PATHS: Record<string, Record<string, string>> = {
2630
esm: 'esm/index.js',
2731
bundle: 'build/bundle.tracing.js',
2832
bundle_min: 'build/bundle.tracing.min.js',
33+
// `tracing` doesn't have an es6 build
2934
bundle_es6: 'build/bundle.tracing.js',
3035
bundle_es6_min: 'build/bundle.tracing.min.js',
3136
},

0 commit comments

Comments
 (0)