Missing files.
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
import {
|
||||
expect
|
||||
} from 'chai';
|
||||
import sortByDepth from './../src/sortByDepth';
|
||||
|
||||
describe('sortByDepth()', () => {
|
||||
it('sorts from deepest to the most shallow', () => {
|
||||
let paths,
|
||||
sortedPaths;
|
||||
|
||||
paths = [
|
||||
'/b',
|
||||
'/a',
|
||||
'/a/b/c',
|
||||
'/a/b'
|
||||
];
|
||||
|
||||
sortedPaths = sortByDepth(paths);
|
||||
|
||||
expect(sortedPaths).to.deep.equal(['/a/b/c', '/a/b', '/b', '/a']);
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user