diff options
Diffstat (limited to 'test/lib/utils/file-exists.js')
-rw-r--r-- | test/lib/utils/file-exists.js | 30 |
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() -}) |