Files
create-github-app-token/tests
Parker BrownandCopilot App a787c84cd8 test: include error detail in token revocation failure snapshot
Revert the redundant redaction in lib/post.js; the token is already
masked via core.setSecret in main. The empty warning came from the
mocked 401 response having no body, so give it one instead.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 61859778-5e53-432d-864c-8eddd0375f86
2026-10-13 16:42:53 -07:00
..

Tests

Add one test file per scenario. You can run them in isolation with:

node tests/post-token-set.test.js

All tests are run together in tests/index.js, which can be executed with Node's built-in test runner

node --test tests/index.js

or with npm

npm test

How the tests work

The output from the tests is captured into a snapshot (tests/index.js.snapshot). It includes all requests sent by our scripts to verify it's working correctly and to prevent regressions.

To update snapshots after an intentional change:

node --test --test-update-snapshots tests/index.js

How to add a new test

We have tests both for the main.js and post.js scripts.