2018-06-28 23:26:08 +00:00
|
|
|
var Path = require('../../src').Path;
|
2014-07-14 19:51:40 +00:00
|
|
|
var expect = require('chai').expect;
|
|
|
|
|
|
|
|
describe('Path.normalize and trailing slashes', function() {
|
|
|
|
|
|
|
|
it('should remove trailing slashes as expected', function() {
|
|
|
|
var strip = Path.normalize;
|
|
|
|
|
|
|
|
expect(strip('/')).to.equal('/');
|
|
|
|
expect(strip('/foo/')).to.equal('/foo');
|
|
|
|
expect(strip('/foo//')).to.equal('/foo');
|
|
|
|
expect(strip('/foo/bar/baz/')).to.equal('/foo/bar/baz');
|
|
|
|
});
|
|
|
|
|
|
|
|
});
|