src/testUtils.ts: log the lines triggerring JSON parse failures
Also, fix the condition in statusbar.test.ts (we want the test
to run only during the full test before pushing the nightly).
Updates golang/vscode-go#357
Change-Id: Id0fe9fdd7d71afc286d9d72efc29572bf0dd22c1
Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/242784
Reviewed-by: Rebecca Stambler <rstambler@golang.org>
diff --git a/src/testUtils.ts b/src/testUtils.ts
index 50965e8..52f9c3d 100644
--- a/src/testUtils.ts
+++ b/src/testUtils.ts
@@ -362,7 +362,7 @@
outputChannel.appendLine(out.trimRight());
}
} catch (e) {
- console.log(`failed to parse JSON: ${e}`);
+ console.log(`failed to parse JSON: ${e}: ${line}`);
outputChannel.appendLine(line);
}
};
diff --git a/test/integration/statusbar.test.ts b/test/integration/statusbar.test.ts
index 0b17a43..4d1534b 100644
--- a/test/integration/statusbar.test.ts
+++ b/test/integration/statusbar.test.ts
@@ -101,7 +101,7 @@
});
it('should download an uninstalled version of Go', async () => {
- if (!!process.env['VSCODEGO_BEFORE_RELEASE_TESTS']) {
+ if (!process.env['VSCODEGO_BEFORE_RELEASE_TESTS']) {
return;
}