Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion scripts/clear-cache.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import cacache from "cacache";

// Import Internal Dependencies
import { CACHE_PATH } from "../src/http-server/cache.js";
import { CACHE_PATH } from "../src/cache.js";

await cacache.rm.all(CACHE_PATH);

Expand Down
12 changes: 10 additions & 2 deletions test/cache.test.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Import Node.js Dependencies
import assert from "node:assert/strict";
import { before, describe, it } from "node:test";
import { after, before, describe, it } from "node:test";
import fs from "node:fs";
import path from "node:path";
import os from "node:os";
Expand All @@ -10,13 +10,21 @@ import cacache from "cacache";

// Import Internal Dependencies
import { appCache } from "../src/cache.js";
import * as config from "../src/http-server/config.js";

// CONSTANTS
const kPayloadsPath = path.join(os.homedir(), ".nsecure", "payloads");

describe("appCache", () => {
before(() => {
let actualConfig;

before(async() => {
appCache.prefix = "test_runner";
actualConfig = await config.get();
});

after(async() => {
await config.set(actualConfig);
});

it("should update and get config", async() => {
Expand Down