tangled
alpha
login
or
join now
tylur.dev
/
prototypey
prototypey.org - atproto lexicon typescript toolkit - mirror https://github.com/tylersayshi/prototypey
1
fork
atom
overview
issues
pulls
pipelines
remove unused test
Tyler
3 months ago
a53e2ef5
93302e30
-36
1 changed file
expand all
collapse all
unified
split
packages
cli
tests
integration
filesystem.test.ts
-36
packages/cli/tests/integration/filesystem.test.ts
···
1
1
-
import { expect, test, describe, beforeEach, afterEach } from "vitest";
2
2
-
import {
3
3
-
mkdir,
4
4
-
writeFile,
5
5
-
rm,
6
6
-
chmod,
7
7
-
access,
8
8
-
constants,
9
9
-
} from "node:fs/promises";
10
10
-
import { join } from "node:path";
11
11
-
import { tmpdir } from "node:os";
12
12
-
import { runCLI } from "../test-utils.js";
13
13
-
14
14
-
describe("CLI File System Handling", () => {
15
15
-
let testDir: string;
16
16
-
let outDir: string;
17
17
-
let schemasDir: string;
18
18
-
19
19
-
beforeEach(async () => {
20
20
-
// Create a temporary directory for test files
21
21
-
testDir = join(tmpdir(), `prototypey-fs-test-${String(Date.now())}`);
22
22
-
outDir = join(testDir, "output");
23
23
-
schemasDir = join(testDir, "schemas");
24
24
-
await mkdir(testDir, { recursive: true });
25
25
-
await mkdir(schemasDir, { recursive: true });
26
26
-
});
27
27
-
28
28
-
afterEach(async () => {
29
29
-
// Clean up test directory
30
30
-
try {
31
31
-
await rm(testDir, { recursive: true, force: true });
32
32
-
} catch (error) {
33
33
-
// Ignore cleanup errors
34
34
-
}
35
35
-
});
36
36
-
});