Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion configs/eslint-config-compass/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ const extraTsRules = {
'@typescript-eslint/unbound-method': 'warn',
'@typescript-eslint/no-duplicate-type-constituents': 'warn',
'@typescript-eslint/no-unsafe-declaration-merging': 'warn',
'@typescript-eslint/no-floating-promises': 'warn',
'@typescript-eslint/no-unsafe-enum-comparison': 'warn',
'@typescript-eslint/no-misused-promises': 'warn',
'@typescript-eslint/no-duplicate-enum-values': 'warn',
Expand Down
2 changes: 1 addition & 1 deletion packages/compass/src/main/auto-update-manager.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ function setStateAndWaitForUpdate(
if (newState === expected) {
resolved = true;
CompassAutoUpdateManager.off('new-state', resolveWhenState);
Promise.resolve(
void Promise.resolve(
CompassAutoUpdateManager['currentStateTransition']
).finally(() => {
CompassAutoUpdateManager['currentActionAbortController'].abort();
Expand Down
4 changes: 2 additions & 2 deletions packages/compass/src/main/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -116,13 +116,13 @@ async function main(): Promise<void> {
process.stderr.write('Exiting due to uncaughtException:\n');
// eslint-disable-next-line no-console
console.error(err);
CompassApplication.runExitHandlers().finally(() => app.exit(1));
void CompassApplication.runExitHandlers().finally(() => app.exit(1));
});
process.on('unhandledRejection', (err) => {
process.stderr.write('Exiting due to unhandledRejection:\n');
// eslint-disable-next-line no-console
console.error(err);
CompassApplication.runExitHandlers().finally(() => app.exit(1));
void CompassApplication.runExitHandlers().finally(() => app.exit(1));
});
}

Expand Down
34 changes: 16 additions & 18 deletions packages/data-service/src/instance-detail-helper.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -277,26 +277,24 @@ describe('instance-detail-helper', function () {
});

context('isAtlas and isLocalAtlas', function () {
it(`should be identified as atlas with hostname correct hostnames`, function () {
['myserver.mongodb.net', 'myserver.mongodb-dev.net'].map(
async (hostname) => {
const { client, connectionString } = createMongoClientMock({
hosts: [{ host: hostname, port: 9999 }],
commands: {
buildInfo: {},
getCmdLineOpts: fixtures.CMD_LINE_OPTS,
},
});
for (const hostname of [
'myserver.mongodb.net',
'myserver.mongodb-dev.net',
]) {
it(`should be identified as atlas when hostname = ${hostname}`, async function () {
const { client, connectionString } = createMongoClientMock({
hosts: [{ host: hostname, port: 9999 }],
commands: {
buildInfo: {},
getCmdLineOpts: fixtures.CMD_LINE_OPTS,
},
});

const instanceDetails = await getInstance(
client,
connectionString
);
const instanceDetails = await getInstance(client, connectionString);

expect(instanceDetails).to.have.property('isAtlas', true);
}
);
});
expect(instanceDetails).to.have.property('isAtlas', true);
});
}

it(`should be identified as atlas when atlasVersion command is present`, async function () {
const { client, connectionString } = createMongoClientMock({
Expand Down
Loading