Skip to content

Commit 7e3c026

Browse files
committed
Use new methods in test
1 parent 8eaf1e9 commit 7e3c026

File tree

1 file changed

+11
-3
lines changed

1 file changed

+11
-3
lines changed

extensions/ql-vscode/test/vscode-tests/activated-extension/variant-analysis/variant-analysis-manager.test.ts

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,10 @@ import { App } from "../../../../src/common/app";
4545
import { ExtensionApp } from "../../../../src/common/vscode/vscode-app";
4646
import { DbConfigStore } from "../../../../src/databases/config/db-config-store";
4747
import { mockedObject } from "../../utils/mocking.helpers";
48+
import {
49+
REPO_STATES_FILENAME,
50+
writeRepoStates,
51+
} from "../../../../src/variant-analysis/store/repo-states-store";
4852

4953
// up to 3 minutes per test
5054
jest.setTimeout(3 * 60 * 1000);
@@ -119,8 +123,12 @@ describe("Variant Analysis Manager", () => {
119123
});
120124

121125
it("should read in the repo states if it exists", async () => {
122-
await fs.writeJson(
123-
join(storagePath, variantAnalysis.id.toString(), "repo_states.json"),
126+
await writeRepoStates(
127+
join(
128+
storagePath,
129+
variantAnalysis.id.toString(),
130+
REPO_STATES_FILENAME,
131+
),
124132
{
125133
[scannedRepos[0].repository.id]: {
126134
repositoryId: scannedRepos[0].repository.id,
@@ -177,7 +185,7 @@ describe("Variant Analysis Manager", () => {
177185
repoStatesPath = join(
178186
storagePath,
179187
variantAnalysis.id.toString(),
180-
"repo_states.json",
188+
REPO_STATES_FILENAME,
181189
);
182190
});
183191

0 commit comments

Comments
 (0)