Files
Parker Brown e715b04a11 feat: add proxy support via child process spawning
When proxy environment variables (https_proxy, HTTPS_PROXY, http_proxy,
HTTP_PROXY) are detected and NODE_USE_ENV_PROXY is not already set to
"1", the action spawns a child process with NODE_USE_ENV_PROXY=1 to
enable Node.js native proxy support.

- Add lib/run-with-proxy.js shared utility for both main.js and post.js
- Update main.js and post.js to use runWithProxy() wrapper
- Add tests for proxy spawning, child error handling, and already-enabled path
- 100% code coverage maintained

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-03-12 20:33:29 -07:00
..
2025-05-02 11:44:01 -07:00
2025-03-27 19:00:54 +00: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 ava

npx ava tests/index.js

or with npm

npm test

How the tests work

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

How to add a new test

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