Skip to content

Commit 921b26e

Browse files
committed
fixup: explicit throw, skip test for web, will need to skip more
1 parent 52c7408 commit 921b26e

File tree

2 files changed

+10
-15
lines changed

2 files changed

+10
-15
lines changed

packages/compass-e2e-tests/tests/connection.test.ts

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -329,7 +329,8 @@ describe('Connection string', function () {
329329
});
330330

331331
it('can connect to an Atlas replicaset without srv', async function () {
332-
if (!hasAtlasEnvironmentVariables()) {
332+
if (!hasAtlasEnvironmentVariables() || TEST_COMPASS_WEB) {
333+
// Skip this on web because it doesn't support saslprep.
333334
return this.skip();
334335
}
335336

@@ -340,15 +341,13 @@ describe('Connection string', function () {
340341

341342
const connectionString = await resolveMongodbSrv(withSRV);
342343
await browser.connectWithConnectionString(connectionString);
343-
if (!TEST_COMPASS_WEB) {
344-
const result = await browser.shellEval(
345-
connectionNameFromString(connectionString),
346-
'db.runCommand({ connectionStatus: 1 })',
347-
true
348-
);
349-
assertNotError(result);
350-
expect(result).to.have.property('ok', 1);
351-
}
344+
const result = await browser.shellEval(
345+
connectionNameFromString(connectionString),
346+
'db.runCommand({ connectionStatus: 1 })',
347+
true
348+
);
349+
assertNotError(result);
350+
expect(result).to.have.property('ok', 1);
352351
});
353352

354353
it('can connect to an Atlas cluster with a direct connection', async function () {
Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,3 @@
11
export function saslprep(): void {
2-
// no-op
2+
throw new Error('saslprep is not supported in this environment');
33
}
4-
5-
export default {
6-
saslprep,
7-
};

0 commit comments

Comments
 (0)