test(cli): reduce repeated startup and filesystem setup

This commit is contained in:
morluto
2026-10-08 04:03:24 +08:00
parent 9c3479ed95
commit d88d6c1897
19 changed files with 409 additions and 677 deletions
@@ -11,16 +11,12 @@ it("imports test-suffixed filenames with unchanged paths, hashes, and languages"
const root = await createTestTempDirectory("rea-reference-test-filenames-");
const files = [
["main_test.go", "package main\n", ["source", "test"], "Go"],
["main_test.py", "assert True\n", ["source", "test"], "Python"],
["test_helper.py", "assert True\n", ["source", "test"], "Python"],
["parser_spec.rs", "fn checks() {}\n", ["source", "test"], "Rust"],
["Widget_SPEC.TS", "export {};\n", ["source", "test"], "TypeScript"],
["main_test", "test fixture\n", ["test"], null],
["main_spec", "spec fixture\n", ["test"], null],
["test_helper.py", "assert True\n", ["source", "test"], "Python"],
["main.test.js", "export {};\n", ["source", "test"], "JavaScript"],
["main.go", "package main\n", ["source"], "Go"],
["main_test_helper.py", "value = 1\n", ["source"], "Python"],
["main_specimen.rs", "fn main() {}\n", ["source"], "Rust"],
["main_test.py.bak", "backup\n", ["unknown"], null],
] as const;
await Promise.all(