Fix Code Scanning warnings

This commit is contained in:
Andrew Eisenberg
2021-01-11 08:57:47 -08:00
parent cace4acb1e
commit 093a51cee3
2 changed files with 2 additions and 4 deletions

View File

@@ -220,14 +220,13 @@ export class QLTestAdapter extends DisposableObject implements TestAdapter {
const state = event.pass
? 'passed'
: event.messages?.length
? 'errored'
: 'failed';
? 'errored'
: 'failed';
let message: string | undefined;
if (event.diff?.length) {
message = ['', `${state}: ${event.test}`, ...event.diff, ''].join('\n');
testLogger.log(message);
}
(event.diff || []).join('\n');
this._testStates.fire({
type: 'test',
state,

View File

@@ -214,7 +214,6 @@ describe('Launcher path', () => {
it('should warn when using a hard-coded deprecated launcher name', async () => {
launcherThatExists = 'codeql.cmd';
path.sep;
const result = await getExecutableFromDirectory('abc');
expect(fsSpy).to.have.been.calledWith(pathToExe);
expect(fsSpy).to.have.been.calledWith(pathToCmd);