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
diff options
context:
space:
mode:
Diffstat (limited to 'test/lib/utils/file-exists.js')
-rw-r--r--test/lib/utils/file-exists.js30
1 files changed, 0 insertions, 30 deletions
diff --git a/test/lib/utils/file-exists.js b/test/lib/utils/file-exists.js
deleted file mode 100644
index c8edf4d96..000000000
--- a/test/lib/utils/file-exists.js
+++ /dev/null
@@ -1,30 +0,0 @@
-const t = require('tap')
-const fileExists = require('../../../lib/utils/file-exists.js')
-
-t.test('returns true when arg is a file', async (t) => {
- const path = t.testdir({
- foo: 'just some file',
- })
-
- const result = await fileExists(`${path}/foo`)
- t.equal(result, true, 'file exists')
- t.end()
-})
-
-t.test('returns false when arg is not a file', async (t) => {
- const path = t.testdir({
- foo: {},
- })
-
- const result = await fileExists(`${path}/foo`)
- t.equal(result, false, 'file does not exist')
- t.end()
-})
-
-t.test('returns false when arg does not exist', async (t) => {
- const path = t.testdir()
-
- const result = await fileExists(`${path}/foo`)
- t.equal(result, false, 'file does not exist')
- t.end()
-})