@@ -22,8 +22,8 @@ import { CodeQLCliServer, SourceInfo } from "../../../src/cli";
2222import { CancellationTokenSource, Uri } from "vscode";
2323import { tmpDir } from "../../../src/helpers";
2424import {
25- slurpQueryHistory ,
26- splatQueryHistory ,
25+ deserializeQueryHistory ,
26+ serializeQueryHistory ,
2727} from "../../../src/query-serialization";
2828import {
2929 formatLegacyMessage,
@@ -438,7 +438,7 @@ describe("query-results", () => {
438438 );
439439 });
440440
441- describe("splat and slurp ", () => {
441+ describe("serialize and deserialize ", () => {
442442 let infoSuccessRaw: LocalQueryInfo;
443443 let infoSuccessInterpreted: LocalQueryInfo;
444444 let infoEarlyFailure: LocalQueryInfo;
@@ -488,7 +488,7 @@ describe("query-results", () => {
488488 ];
489489 });
490490
491- it("should splat and slurp query history", async () => {
491+ it("should serialize and deserialize query history", async () => {
492492 // the expected results only contains the history with completed queries
493493 const expectedHistory = [
494494 infoSuccessRaw,
@@ -498,17 +498,17 @@ describe("query-results", () => {
498498
499499 const allHistoryPath = join(tmpDir.name, "workspace-query-history.json");
500500
501- // splat and slurp
502- await splatQueryHistory (allHistory, allHistoryPath);
503- const allHistoryActual = await slurpQueryHistory (allHistoryPath);
501+ // serialize and deserialize
502+ await serializeQueryHistory (allHistory, allHistoryPath);
503+ const allHistoryActual = await deserializeQueryHistory (allHistoryPath);
504504
505505 // the dispose methods will be different. Ignore them.
506506 allHistoryActual.forEach((info) => {
507507 if (info.t === "local" && info.completedQuery) {
508508 const completedQuery = info.completedQuery;
509509 (completedQuery as any).dispose = undefined;
510510
511- // these fields should be missing on the slurped value
511+ // these fields should be missing on the deserialized value
512512 // but they are undefined on the original value
513513 if (!("logFileLocation" in completedQuery)) {
514514 (completedQuery as any).logFileLocation = undefined;
@@ -543,7 +543,7 @@ describe("query-results", () => {
543543 "utf8",
544544 );
545545
546- const allHistoryActual = await slurpQueryHistory (badPath);
546+ const allHistoryActual = await deserializeQueryHistory (badPath);
547547 // version number is invalid. Should return an empty array.
548548 expect(allHistoryActual).toEqual([]);
549549 });
0 commit comments