helps manage and harmonise READMEs in many repositories with template files available on deno.land/x/readme_manager
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
readme-manager/utils_test.ts

56 lines
1.1 KiB

import {
assert,
assertEquals,
} from "https://deno.land/std@0.146.0/testing/asserts.ts";
import {
getAppConfigDirectory,
getAppConfigFile,
getAppLogFile,
getUserConfigDirectory,
runCommand,
} from "./utils.ts";
Deno.test("utils", async (t) => {
await t.step("run command", async () => {
const output = await runCommand(
["echo", "testing"],
(_errorMsg: string, _error?: Error) => {},
);
assertEquals(output, "testing");
});
await t.step("get user config directory", () => {
assert(
getUserConfigDirectory(
(_errorMsg: string, _error?: Error) => {},
),
);
});
await t.step("get app config directory", () => {
assert(
getAppConfigDirectory(
"testing-readme-manager",
(_errorMsg: string, _error?: Error) => {},
),
);
});
await t.step("get app config file", () => {
assert(
getAppConfigFile(
"testing-readme-manager",
(_errorMsg: string, _error?: Error) => {},
),
);
});
await t.step("get app log file", () => {
assert(
getAppLogFile(
"testing-readme-manager",
),
);
});
});