@cuba-platform/front-generator
Version:
CUBA Platform front-end clients generator
17 lines • 849 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
const chai_1 = require("chai");
const utils_1 = require("./utils");
describe('normalizeRelativePath()', () => {
it('Replaces the backslashes in the provided path with forward slashes', () => {
(0, chai_1.expect)((0, utils_1.normalizeRelativePath)('..\\..\\')).to.equal('../../');
(0, chai_1.expect)((0, utils_1.normalizeRelativePath)('..\\..')).to.equal('../../');
});
it('Adds a trailing slash if it is missing', () => {
(0, chai_1.expect)((0, utils_1.normalizeRelativePath)('../..')).to.equal('../../');
});
it('Does not add an additional trailing slash if already present', () => {
(0, chai_1.expect)((0, utils_1.normalizeRelativePath)('../../')).to.equal('../../');
});
});
//# sourceMappingURL=utils.test.js.map