archunit
Version:
ArchUnit TypeScript is an architecture testing library, to specify and assert architecture rules in your TypeScript app
21 lines • 998 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
const path_utils_1 = require("./path-utils");
describe('normalizeWindowsPaths', () => {
it('replaces backslashes with forward slashes', () => {
expect((0, path_utils_1.normalizeWindowsPaths)('C:\\Users\\User\\Documents')).toBe('C:/Users/User/Documents');
});
it('leaves strings with only forward slashes unchanged', () => {
expect((0, path_utils_1.normalizeWindowsPaths)('/usr/local/bin')).toBe('/usr/local/bin');
});
it('handles mixed slashes', () => {
expect((0, path_utils_1.normalizeWindowsPaths)('C:/Users\\User\\Desktop')).toBe('C:/Users/User/Desktop');
});
it('handles empty string', () => {
expect((0, path_utils_1.normalizeWindowsPaths)('')).toBe('');
});
it('handles string with no slashes', () => {
expect((0, path_utils_1.normalizeWindowsPaths)('noslashes')).toBe('noslashes');
});
});
//# sourceMappingURL=path-utils.spec.js.map