Remove resolveQueries()

This commit is contained in:
Chuan-kai Lin
2025-07-23 10:20:17 -07:00
parent da8dabf356
commit a71ebf32ea
2 changed files with 0 additions and 117 deletions
-73
View File
@@ -143,16 +143,6 @@ test("load empty config", async (t) => {
},
};
},
async resolveQueries() {
return {
byLanguage: {
javascript: { queries: ["query1.ql"] },
python: { queries: ["query2.ql"] },
},
noDeclaredLanguage: {},
multipleDeclaredLanguages: {},
};
},
async packDownload(): Promise<PackDownloadOutput> {
return { packs: [] };
},
@@ -195,16 +185,6 @@ test("loading config saves config", async (t) => {
},
};
},
async resolveQueries() {
return {
byLanguage: {
javascript: { queries: ["query1.ql"] },
python: { queries: ["query2.ql"] },
},
noDeclaredLanguage: {},
multipleDeclaredLanguages: {},
};
},
async packDownload(): Promise<PackDownloadOutput> {
return { packs: [] };
},
@@ -330,18 +310,6 @@ test("load non-empty input", async (t) => {
},
};
},
async resolveQueries() {
return {
byLanguage: {
javascript: {
"/foo/a.ql": {},
"/bar/b.ql": {},
},
},
noDeclaredLanguage: {},
multipleDeclaredLanguages: {},
};
},
async packDownload(): Promise<PackDownloadOutput> {
return { packs: [] };
},
@@ -406,25 +374,6 @@ test("load non-empty input", async (t) => {
});
});
/**
* Returns the provided queries, just in the right format for a resolved query
* This way we can test by seeing which returned items are in the final
* configuration.
*/
function queriesToResolvedQueryForm(queries: string[]) {
const dummyResolvedQueries = {};
for (const q of queries) {
dummyResolvedQueries[q] = {};
}
return {
byLanguage: {
javascript: dummyResolvedQueries,
},
noDeclaredLanguage: {},
multipleDeclaredLanguages: {},
};
}
test("Using config input and file together, config input should be used.", async (t) => {
return await withTmpDir(async (tempDir) => {
process.env["RUNNER_TEMP"] = tempDir;
@@ -449,10 +398,6 @@ test("Using config input and file together, config input should be used.", async
fs.mkdirSync(path.join(tempDir, "foo"));
const resolveQueriesArgs: Array<{
queries: string[];
extraSearchPath: string | undefined;
}> = [];
const codeql = createStubCodeQL({
async betterResolveLanguages() {
return {
@@ -462,13 +407,6 @@ test("Using config input and file together, config input should be used.", async
},
};
},
async resolveQueries(
queries: string[],
extraSearchPath: string | undefined,
) {
resolveQueriesArgs.push({ queries, extraSearchPath });
return queriesToResolvedQueryForm(queries);
},
async packDownload(): Promise<PackDownloadOutput> {
return { packs: [] };
},
@@ -502,17 +440,6 @@ test("API client used when reading remote config", async (t) => {
},
};
},
async resolveQueries() {
return {
byLanguage: {
javascript: {
"foo.ql": {},
},
},
noDeclaredLanguage: {},
multipleDeclaredLanguages: {},
};
},
async packDownload(): Promise<PackDownloadOutput> {
return { packs: [] };
},