Files
create-github-app-token/tests/main-enterprise-mutual-exclusivity-both.test.js
T
Stefan Petrushevski 55b8c24e8d tests; update README
2025-07-08 17:05:18 +02:00

17 lines
552 B
JavaScript

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);
}