Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/npm/cli.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorGar <gar+gh@danger.computer>2022-09-01 20:22:26 +0300
committerGar <gar+gh@danger.computer>2022-09-01 20:44:45 +0300
commitda6f4f1a8a7efacaf22a9ebe8e750a1916e2347f (patch)
tree5145eb5ec3805328999d163c86ed42258feba527 /test
parentdcc376534212e13fcd5813db9eb067be8179d04f (diff)
feat: remove `npm bin`gar/remove-bin
BREAKING CHANGE: this removes the `npm bin` command The output of this command is misleading and incomplete. The `.bin` resolution of npm is much more nuanced than this command implies, and the output of `npm bin` is not somthing end users should be dealing with. `npm` itself is responsible for running the `bin` entries of modules, with the exception of global bins, which end up in the same folder as `node` itself, presumably already in a user's path since they can run node. Closes https://github.com/npm/statusboard/issues/537
Diffstat (limited to 'test')
-rw-r--r--test/lib/commands/bin.js32
1 files changed, 0 insertions, 32 deletions
diff --git a/test/lib/commands/bin.js b/test/lib/commands/bin.js
deleted file mode 100644
index 46170e765..000000000
--- a/test/lib/commands/bin.js
+++ /dev/null
@@ -1,32 +0,0 @@
-const t = require('tap')
-const { load: loadMockNpm } = require('../../fixtures/mock-npm')
-const mockGlobals = require('../../fixtures/mock-globals')
-
-t.test('bin not global', async t => {
- const { npm, joinedOutput, logs } = await loadMockNpm(t)
- await npm.exec('bin', [])
- t.match(joinedOutput(), npm.localBin)
- t.match(logs.error, [])
-})
-
-t.test('bin global in env.path', async t => {
- const { npm, joinedOutput, logs } = await loadMockNpm(t, {
- config: { global: true },
- })
-
- mockGlobals(t, {
- 'process.env': { path: npm.globalBin },
- })
- await npm.exec('bin', [])
- t.match(joinedOutput(), npm.globalBin)
- t.match(logs.error, [])
-})
-
-t.test('bin not in path', async t => {
- const { npm, joinedOutput, logs } = await loadMockNpm(t, {
- config: { global: true },
- })
- await npm.exec('bin', [])
- t.match(joinedOutput(), npm.globalBin)
- t.match(logs.error, [['bin', '(not in PATH env variable)']])
-})