File: test.js

package info (click to toggle)
node-path-exists 4.0.0-2
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 124 kB
  • sloc: makefile: 2
file content (14 lines) | stat: -rw-r--r-- 286 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
const test = require('tape');
const pathExists = require('.');

test('async', async t => {
	t.true(await pathExists('test.js'));
	t.false(await pathExists('fail'));
	t.end();
});

test('sync', t => {
	t.true(pathExists.sync('test.js'));
	t.false(pathExists.sync('fail'));
	t.end();
});