Skip to content

Commit 6753525

Browse files
aeisenbergaofaof0907
authored andcommitted
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 a8a998e commit 6753525

12 files changed

Lines changed: 326 additions & 583 deletions

File tree

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

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,7 @@ import { compileTextMateGrammar } from './textmate';
44
import { copyTestData } from './tests';
55
import { compileView } from './webpack';
66
import { packageExtension } from './package';
7-
import { injectAppInsightsKey } from './appInsights';
87

9-
export const buildWithoutPackage =
10-
gulp.parallel(
11-
compileTypeScript, compileTextMateGrammar, compileView, copyTestData, copyViewCss
12-
);
13-
14-
export { compileTextMateGrammar, watchTypeScript, compileTypeScript, injectAppInsightsKey };
15-
exports.default = gulp.series(buildWithoutPackage, injectAppInsightsKey, packageExtension);
8+
export const buildWithoutPackage = gulp.parallel(compileTypeScript, compileTextMateGrammar, compileView, copyTestData, copyViewCss);
9+
export { compileTextMateGrammar, watchTypeScript, compileTypeScript, copyTestData };
10+
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)