You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: extensions/ql-vscode/test/pure-tests/command-lint.test.ts
-19Lines changed: 0 additions & 19 deletions
Original file line number
Diff line number
Diff line change
@@ -27,9 +27,6 @@ describe('commands declared in package.json', function() {
27
27
constscopedCmds: Set<string>=newSet<string>();
28
28
constcommandTitles: {[cmd: string]: string}={};
29
29
30
-
// These are commands which are only used for testing/development
31
-
consttestCmds=newSet<string>();
32
-
33
30
commands.forEach((commandDecl: CmdDecl)=>{
34
31
const{ command, title }=commandDecl;
35
32
if(
@@ -51,13 +48,6 @@ describe('commands declared in package.json', function() {
51
48
expect(title).not.to.be.undefined;
52
49
commandTitles[command]=title!;
53
50
}
54
-
elseif(
55
-
command.match(/^codeQLMockGitHubApiServer\./)
56
-
){
57
-
testCmds.add(command);
58
-
expect(title).not.to.be.undefined;
59
-
commandTitles[command]=title!;
60
-
}
61
51
else{
62
52
expect.fail(`Unexpected command name ${command}`);
63
53
}
@@ -92,22 +82,13 @@ describe('commands declared in package.json', function() {
92
82
scopedCmds.forEach(command=>{
93
83
expect(commandTitles[command],`command ${command} should not be prefixed with 'CodeQL: ', since it is accessible from an extension-controlled context`).not.to.match(/^CodeQL:/);
94
84
});
95
-
96
-
testCmds.forEach(command=>{
97
-
expect(commandTitles[command],`command ${command} should be prefixed with 'CodeQL ', since it is a testing/development command`).to.match(/^CodeQL/);
98
-
expect(commandTitles[command],`command ${command} should not be prefixed with 'CodeQL: ', since it is a testing/development command`).not.to.match(/^CodeQL:/);
99
-
});
100
85
});
101
86
102
87
it('should have the right commands accessible from the command palette',function(){
103
88
paletteCmds.forEach(command=>{
104
89
expect(disabledInPalette.has(command),`command ${command} should be enabled in the command palette`).to.be.false;
105
90
});
106
91
107
-
testCmds.forEach(command=>{
108
-
expect(disabledInPalette.has(command),`command ${command} should be enabled in the command palette`).to.be.false;
109
-
});
110
-
111
92
// Commands in contribContextMenuCmds may reasonbly be enabled or
112
93
// disabled in the command palette; for example, codeQL.runQuery
113
94
// is available there, since we heuristically figure out which
0 commit comments