blob: c7929d346766233db9953c3349a1ac13b0134714 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
var pathUtils = require('../lib/utils/path');
describe('Paths', function() {
describe('setExtension', function() {
it('should correctly change extension of filename', function() {
pathUtils.setExtension('test.md', '.html').should.be.equal('test.html');
pathUtils.setExtension('test.md', '.json').should.be.equal('test.json');
});
it('should correctly change extension of path', function() {
pathUtils.setExtension('hello/test.md', '.html').should.be.equal('hello/test.html');
pathUtils.setExtension('hello/test.md', '.json').should.be.equal('hello/test.json');
});
});
});
|