|
@@ -9,6 +9,11 @@ const pathUtils = require('@commons/util/path-utils');
|
|
|
describe('page-utils', () => {
|
|
describe('page-utils', () => {
|
|
|
|
|
|
|
|
describe('.normalizePath', () => {
|
|
describe('.normalizePath', () => {
|
|
|
|
|
+ it('should rurn root path with empty string', done => {
|
|
|
|
|
+ expect(pathUtils.normalizePath('')).to.equal('/');
|
|
|
|
|
+ done();
|
|
|
|
|
+ });
|
|
|
|
|
+
|
|
|
it('should add heading slash', done => {
|
|
it('should add heading slash', done => {
|
|
|
expect(pathUtils.normalizePath('hoge/fuga')).to.equal('/hoge/fuga');
|
|
expect(pathUtils.normalizePath('hoge/fuga')).to.equal('/hoge/fuga');
|
|
|
done();
|
|
done();
|