Skip to content

Commit bb5d041

Browse files
WIP: Add safety check to language server for error checking
1 parent cd598ed commit bb5d041

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

apps/client-e2e/src/tests/runner.class.ts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,9 @@ export class Runner {
110110

111111
// run all of our tests
112112
for (let i = 0; i < this.tests.length; i++) {
113+
// reset log error tracking information
114+
ACTIVATION_RESULT.client.logger.resetTracker();
115+
113116
try {
114117
// check if we should skip running the test
115118
if (!this.canRunTest(this.tests[i])) {
@@ -125,6 +128,13 @@ export class Runner {
125128
// attempt to run test
126129
await this.tests[i].fn(ACTIVATION_RESULT);
127130

131+
// check for unhandled errors
132+
if (ACTIVATION_RESULT.client.logger.tracker.errors > 0) {
133+
throw new Error(
134+
'Unhandled error detected on the language server during test'
135+
);
136+
}
137+
128138
// reset config
129139
await ResetSettingsForTests(config);
130140

0 commit comments

Comments
 (0)