test: integration tests (#40)

Co-authored-by: Gregor Martynus <39992+gr2m@users.noreply.github.com>
This commit is contained in:
Parker Brown
2023-09-05 08:32:55 -07:00
committed by GitHub
parent 49ce228ea7
commit 10f155294b
10 changed files with 2021 additions and 8 deletions

14
tests/index.js Normal file
View File

@@ -0,0 +1,14 @@
import { readdirSync } from "node:fs";
import { execa } from "execa";
import test from "ava";
const tests = readdirSync("tests").filter((file) => file.endsWith(".test.js"));
for (const file of tests) {
test(file, async (t) => {
const { stderr, stdout } = await execa("node", [`tests/${file}`]);
t.snapshot(stderr, "stderr");
t.snapshot(stdout, "stdout");
});
}