Closed nwithan8 closed 10 months ago
CI is failing on Node 12, seems to be an issue with an npm package used for coverage:
Run EASYPOST_TEST_API_KEY=123 EASYPOST_PROD_API_KEY=123 make coverage
npm run coverage
> @easypost/api@7.0.0 coverage /home/runner/work/easypost-node/easypost-node
> cross-env NODE_ENV=test nyc npm run test
Unexpected token '?'
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! @easypost/api@7.0.0 coverage: `cross-env NODE_ENV=test nyc npm run test`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the @easypost/api@7.0.0 coverage script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /home/runner/.npm/_logs/202[4](https://github.com/EasyPost/easypost-node/actions/runs/7452210211/job/20275123483?pr=430#step:7:5)-01-08T19_28_24_20[5](https://github.com/EasyPost/easypost-node/actions/runs/7452210211/job/20275123483?pr=430#step:7:6)Z-debug.log
make: *** [Makefile:[15](https://github.com/EasyPost/easypost-node/actions/runs/7452210211/job/20275123483?pr=430#step:7:16): coverage] Error 1
Error: Process completed with exit code 2.
Can't seem to re-create locally with the same environment:
UPDATE: It's Chai using syntax that only exists in Node 14+: https://github.com/chaijs/chai/pull/1553#issuecomment-1879416380
✖ ERROR: /home/runner/work/easypost-node/easypost-node/node_modules/chai/lib/chai/assertion.js:69
flag(this, 'eql', config.deepEqual ?? util.eql);
Description
See https://github.com/EasyPost/easypost-csharp/pull/540 for more details.
Testing
Pull Request Type
Please select the option(s) that are relevant to this PR.