Skip to content

Commit 5f2e279

Browse files
committed
test: prevent accidental skip
1 parent 0209cfe commit 5f2e279

File tree

1 file changed

+5
-11
lines changed

1 file changed

+5
-11
lines changed

test/manual/atlas_connectivity.test.ts

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -15,19 +15,13 @@ import { LEGACY_HELLO_COMMAND, MongoClient } from '../mongodb';
1515
*/
1616

1717
describe('Atlas Connectivity', function () {
18-
if (process.env.ATLAS_CONNECTIVITY == null) {
19-
console.error(
20-
'skipping atlas connectivity tests, ATLAS_CONNECTIVITY environment variable is not defined'
21-
);
18+
const { ATLAS_CONNECTIVITY = '' } = process.env;
19+
if (ATLAS_CONNECTIVITY === '') throw new Error('ATLAS_CONNECTIVITY not defined in env');
2220

23-
return;
24-
}
25-
26-
const CONFIGS: Record<string, [normalUri: string, srvUri: string]> = JSON.parse(
27-
process.env.ATLAS_CONNECTIVITY
28-
);
21+
const CONFIGS: Record<string, [normalUri: string, srvUri: string]> =
22+
JSON.parse(ATLAS_CONNECTIVITY);
2923

30-
let client;
24+
let client: MongoClient;
3125

3226
afterEach(async function () {
3327
await client.close();

0 commit comments

Comments
 (0)