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/lib
diff options
context:
space:
mode:
authorYucel Okcu <yucel.n.okcu@gmail.com>2021-11-19 11:43:07 +0300
committerGar <gar+gh@danger.computer>2021-11-22 17:58:35 +0300
commit5f4040aa0e30a3b74caab64958770c682e4d0031 (patch)
treef730b37d5be8d789caf5214e1e850f29aad154e1 /test/lib
parent940ba878019e7b35bda20a26baaa4c99bebc906b (diff)
chore: remove get-project-scope utils
Diffstat (limited to 'test/lib')
-rw-r--r--test/lib/utils/get-project-scope.js48
1 files changed, 0 insertions, 48 deletions
diff --git a/test/lib/utils/get-project-scope.js b/test/lib/utils/get-project-scope.js
deleted file mode 100644
index 9737b0643..000000000
--- a/test/lib/utils/get-project-scope.js
+++ /dev/null
@@ -1,48 +0,0 @@
-const getProjectScope = require('../../../lib/utils/get-project-scope.js')
-const t = require('tap')
-
-t.test('package.json with scope', t => {
- const dir = t.testdir({
- 'package.json': JSON.stringify({ name: '@foo/bar' }),
- })
- t.equal(getProjectScope(dir), '@foo')
- t.end()
-})
-
-t.test('package.json with slash, but no @', t => {
- const dir = t.testdir({
- 'package.json': JSON.stringify({ name: 'foo/bar' }),
- })
- t.equal(getProjectScope(dir), '')
- t.end()
-})
-
-t.test('package.json without scope', t => {
- const dir = t.testdir({
- 'package.json': JSON.stringify({ name: 'foo' }),
- })
- t.equal(getProjectScope(dir), '')
- t.end()
-})
-
-t.test('package.json without name', t => {
- const dir = t.testdir({
- 'package.json': JSON.stringify({}),
- })
- t.equal(getProjectScope(dir), '')
- t.end()
-})
-
-t.test('package.json not JSON', t => {
- const dir = t.testdir({
- 'package.json': 'hello',
- })
- t.equal(getProjectScope(dir), '')
- t.end()
-})
-
-t.test('no package.json', t => {
- const dir = t.testdir({})
- t.equal(getProjectScope(dir), '')
- t.end()
-})