Skip to content

Commit 659aaa7

Browse files
committed
Simplified tsconfigs
1 parent 307e22f commit 659aaa7

File tree

4 files changed

+16
-12
lines changed

4 files changed

+16
-12
lines changed

packages/compass-e2e-tests/helpers/compass-web-sandbox.ts

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
import assert from 'node:assert/strict';
2+
13
import crossSpawn from 'cross-spawn';
24
import { remote } from 'webdriverio';
35
import Debug from 'debug';
@@ -171,12 +173,16 @@ export async function spawnCompassWebSandboxAndSignInToAtlas(
171173
}
172174

173175
const res = settledRes.value;
176+
assert(
177+
res.ok,
178+
`Failed to authenticate in Atlas Cloud: ${res.statusText} (${res.status})`
179+
);
174180

175-
if (res.ok === false || !(await res.json()).projectId) {
176-
throw new Error(
177-
`Failed to authenticate in Atlas Cloud: ${res.statusText} (${res.status})`
178-
);
179-
}
181+
const body = await res.json();
182+
assert(
183+
typeof body === 'object' && body !== null && 'projectId' in body,
184+
'Expected a project id'
185+
);
180186

181187
if (signal.aborted) {
182188
return electronProxyRemote;

packages/compass-e2e-tests/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"description": "E2E test suite for Compass app that follows smoke tests / feature testing matrix",
66
"scripts": {
77
"clean": "node -e \"try { fs.rmdirSync('.mongodb', { recursive: true }); } catch (e) {}\" && node -e \"try { fs.rmdirSync('.log', { recursive: true }); } catch (e) {}\"",
8-
"typecheck": "tsc -p tsconfig-lint.json --noEmit",
8+
"typecheck": "tsc -p tsconfig.json",
99
"eslint": "eslint",
1010
"prettier": "prettier",
1111
"lint": "npm run typecheck && npm run eslint . && npm run prettier -- --check .",

packages/compass-e2e-tests/tsconfig-lint.json

Lines changed: 0 additions & 5 deletions
This file was deleted.
Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
{
22
"extends": "@mongodb-js/tsconfig-compass/tsconfig.common.json",
3-
"compilerOptions": {}
3+
"compilerOptions": {
4+
"noEmit": true
5+
},
6+
"include": ["helpers", "installers", "tests", "*.ts"]
47
}

0 commit comments

Comments
 (0)