Skip to content

Commit 1e444dc

Browse files
andrewvcCopilot
andauthored
chore: unset SYNTHETICS_API_KEY before tests to ensure clean test env (#1050)
* Unset SYNTHETICS_API_KEY before tests to ensure clean test env --------- Co-authored-by: Copilot <[email protected]>
1 parent 26fa3a4 commit 1e444dc

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

__tests__/utils/jest-global-setup.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,12 @@ import { spawn } from 'child_process';
2727
import { wsEndpoint } from './test-config';
2828

2929
module.exports = async () => {
30+
// Unset the SYNTHETICS_API_KEY to ensure it doesn't affect tests
31+
if (process.env.SYNTHETICS_API_KEY) {
32+
console.log('Unsetting SYNTHETICS_API_KEY environment variable for tests');
33+
delete process.env.SYNTHETICS_API_KEY;
34+
}
35+
3036
if (wsEndpoint) {
3137
return new Promise((resolve, reject) => {
3238
console.log(`\nRunning BrowserService ${wsEndpoint}`);

0 commit comments

Comments
 (0)