Skip to content

test: fix npm test compatibility with v27 nightly - #1188

Open
MikeMcC399 wants to merge 2 commits into
nodejs:mainfrom
MikeMcC399:fix/v27-nightly
Open

MikeMcC399 wants to merge 2 commits into
nodejs:mainfrom
MikeMcC399:fix/v27-nightly

Conversation

@MikeMcC399

Copy link
Copy Markdown
Contributor

Situation

Running npm test fails under Node.js v27 nightlies, which now include npm@12.1.0.

Change

  1. Add the environment variable npm_config_allow_git: 'all' to the test "citgm: omg-i-pass from git url" in test/test-citgm.js.

  2. Replace the parameter --extra-param with the environment variable npm_config_extra_param instead of passing it using the CLI. See https://docs.npmjs.com/cli/v12/using-npm/config#environment-variables

Verification

On Ubuntu 26.04.1 LTS, with n Node.js version manager installed.

n nightly # for example nightly/27.0.0-nightly20261007aa1bf2cc37
git clone https://github.com/nodejs/citgm
cd citgm
npm install
npx tap test/test-citgm.js
npx tap test/npm/test-npm-install.js
npm test

Confirm successful test.

Checklist
  • npm test passes
  • contribution guidelines followed
    here

changed for npm 12 compatibility
which otherwise throws an error for unknown cli flags

Signed-off-by: Mike McCready <66998419+MikeMcC399@users.noreply.github.com>
changed for npm 12 compatibility
which otherwise throws an error EALLOWGIT when attempting
to install from a git source

Signed-off-by: Mike McCready <66998419+MikeMcC399@users.noreply.github.com>
@codecov-commenter

codecov-commenter commented Oct 8, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 96.11%. Comparing base (17e7dea) to head (c9370b1).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1188      +/-   ##
==========================================
- Coverage   96.20%   96.11%   -0.10%     
==========================================
  Files          29       29              
  Lines        2213     2213              
==========================================
- Hits         2129     2127       -2     
- Misses         84       86       +2     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

npm 12 - npm run tap (2 failures)

2 participants