Skip to content

Commit cba9ff5

Browse files
author
deiu
committed
Test bed for utility functions
1 parent cde19b9 commit cba9ff5

1 file changed

Lines changed: 18 additions & 0 deletions

File tree

‎test/utils.js‎

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
var assert = require('chai').assert;
2+
3+
var utils = require('../lib/utils');
4+
5+
describe('Utility functions', function() {
6+
7+
describe('basename', function() {
8+
it('should return bar as relative path', function() {
9+
assert.equal(utils.basename('/foo/bar'), 'bar');
10+
});
11+
it('should return empty as relative path', function() {
12+
assert.equal(utils.basename('/foo/'), '');
13+
});
14+
it('should return empty as relative path', function() {
15+
assert.equal(utils.basename('/'), '');
16+
});
17+
});
18+
});

0 commit comments

Comments
 (0)