Skip to content

Commit 6046cf1

Browse files
committed
Add integration test for running a query
In order to do this, needed to add a few extra pieces: * extracted the simple database download so that it only happens once and is shared across all tests. * needed to update mocha to latest version since that has the new API * But typings isn't updated yet, so submitted a PR into DefinitelyTyped for that. * Added a concept of helper files for test runs. These helper files will contain all the shared global setup. Unfortunately, at this point, we can't run using a language pack since we would also need to download the the ql repository from somewhere.
1 parent 864041e commit 6046cf1

12 files changed

Lines changed: 324 additions & 374 deletions

File tree

extensions/ql-vscode/gulpfile.ts/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,5 @@ import { compileView } from './webpack';
66
import { packageExtension } from './package';
77

88
export const buildWithoutPackage = gulp.parallel(compileTypeScript, compileTextMateGrammar, compileView, copyTestData, copyViewCss);
9-
export { compileTextMateGrammar, watchTypeScript, compileTypeScript };
9+
export { compileTextMateGrammar, watchTypeScript, compileTypeScript, copyTestData };
1010
exports.default = gulp.series(exports.buildWithoutPackage, packageExtension);
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,17 @@
11
import * as gulp from 'gulp';
22

33
export function copyTestData() {
4+
copyNoWorkspaceData();
5+
copyCliIntegrationData();
6+
return Promise.resolve();
7+
}
8+
9+
function copyNoWorkspaceData() {
410
return gulp.src('src/vscode-tests/no-workspace/data/**/*')
511
.pipe(gulp.dest('out/vscode-tests/no-workspace/data'));
612
}
13+
14+
function copyCliIntegrationData() {
15+
return gulp.src('src/vscode-tests/cli-integration/data/**/*')
16+
.pipe(gulp.dest('out/vscode-tests/cli-integration/data'));
17+
}

0 commit comments

Comments
 (0)