You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
21 lines
387 B
JavaScript
21 lines
387 B
JavaScript
7 years ago
|
var test = require('tap').test;
|
||
|
var parents = require('../');
|
||
|
|
||
|
test('dirname', function (t) {
|
||
|
var dirs = parents('/foo/bar/baz/quux');
|
||
|
t.same(dirs, [
|
||
|
'/foo/bar/baz/quux',
|
||
|
'/foo/bar/baz',
|
||
|
'/foo/bar',
|
||
|
'/foo',
|
||
|
'/',
|
||
|
]);
|
||
|
t.end();
|
||
|
});
|
||
|
|
||
|
test('root', function (t) {
|
||
|
var dirs = parents('/');
|
||
|
t.same(dirs, [ '/' ]);
|
||
|
t.end();
|
||
|
});
|