tests; update README

This commit is contained in:
Stefan Petrushevski
2025-07-08 17:05:18 +02:00
parent cbc2930e9b
commit 55b8c24e8d
10 changed files with 311 additions and 0 deletions
@@ -0,0 +1,16 @@
import { DEFAULT_ENV } from "./main.js";
// Verify `main` exits with an error when `enterprise` is used with both `owner` and `repositories` inputs.
try {
// Set up environment with enterprise, owner, and repositories all set
for (const [key, value] of Object.entries(DEFAULT_ENV)) {
process.env[key] = value;
}
process.env.INPUT_ENTERPRISE = "test-enterprise";
process.env.INPUT_OWNER = "test-owner";
process.env.INPUT_REPOSITORIES = "repo1,repo2";
await import("../main.js");
} catch (error) {
console.error(error.message);
}