Merge pull request #1398 from github/aeisenberg/integration-tests-fix

Fix failing integration test
This commit is contained in:
Andrew Eisenberg
2022-06-21 17:33:54 -07:00
committed by GitHub
2 changed files with 9 additions and 4 deletions

View File

@@ -12,9 +12,13 @@ import { DatabaseManager } from '../../databases';
export const DB_URL = 'https://github.com/github/vscode-codeql/files/5586722/simple-db.zip';
process.addListener('unhandledRejection', (reason, p) => {
console.log('Unhandled Rejection at: Promise ', p, ' reason: ', reason);
fail(String(reason));
process.addListener('unhandledRejection', (reason) => {
if (reason instanceof Error && reason.message === 'Canceled') {
console.log('Cancellation requested after the test has ended.');
process.exit(0);
} else {
fail(String(reason));
}
});
// We need to resolve the path, but the final three segments won't exist until later, so we only resolve the

View File

@@ -157,10 +157,11 @@ describe('Queries', function() {
});
it('should avoid creating a quick query', async () => {
fs.mkdirpSync(path.dirname(qlpackFile));
fs.writeFileSync(qlpackFile, yaml.dump({
name: 'quick-query',
version: '1.0.0',
libraryPathDependencies: ['codeql-javascript']
libraryPathDependencies: ['codeql/javascript-all']
}));
fs.writeFileSync(qlFile, 'xxx');
await commands.executeCommand('codeQL.quickQuery');