Fix failing integration test
How did this ever work? It was using an old variant of the qlpack name. Also, this commit makes the unhandledRejection handler less verbose. This gets hit when the tests end and there is a cancellation. this is not an error.
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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');
|
||||
|
||||
Reference in New Issue
Block a user