From d9a1d76cae48994da616e1a02f0a7e7e9d5f6f70 Mon Sep 17 00:00:00 2001 From: Gar Date: Tue, 26 Nov 2024 09:01:57 -0800 Subject: [PATCH] chore(tests): account for when npm is a prerelease A few of our tests necessarily use npm's own local version in its package.json, and those tests need to be fixed for the new breaking change that requires an explicit dist tag. --- smoke-tests/test/npm-replace-global.js | 2 +- test/lib/commands/publish.js | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/smoke-tests/test/npm-replace-global.js b/smoke-tests/test/npm-replace-global.js index 3514549aa40cd..d3638158e2ca6 100644 --- a/smoke-tests/test/npm-replace-global.js +++ b/smoke-tests/test/npm-replace-global.js @@ -143,7 +143,7 @@ t.test('publish and replace global self', async t => { } return false }).reply(201, {}) - await npmLocal('publish', { proxy: true, force: true }) + await npmLocal('publish', '--tag=smoke-test', { proxy: true, force: true }) t.comment(JSON.stringify(publishedPackument, null, 2)) diff --git a/test/lib/commands/publish.js b/test/lib/commands/publish.js index d187ae5fec80a..5462b30cb7a79 100644 --- a/test/lib/commands/publish.js +++ b/test/lib/commands/publish.js @@ -962,6 +962,7 @@ t.test('manifest', async t => { const { npm } = await loadMockNpm(t, { config: { ...auth, + tag: 'latest', 'foreground-scripts': false, }, chdir: () => root,