serde-fns
Version:
simple shapes and procedures for serde with a pit-of-success
22 lines • 1.14 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
const visualogic_1 = require("visualogic");
const uriComponent_1 = require("./uriComponent");
describe((0, visualogic_1.getResourceNameFromFileName)(__filename), () => {
it('should find a partially uri encoded string to not be a SerialUriComponent', () => {
const partial = [
(0, uriComponent_1.asSerialUriComponent)('this-part is $encoded!'),
'& this! p@rt is not!',
].join(' ');
expect((0, uriComponent_1.isSerialUriComponent)(partial)).toEqual(false);
});
it('should find a fully uri encoded string to indeed be a SerialUriComponent', () => {
const encoded = (0, uriComponent_1.asSerialUriComponent)('this-part is $encoded!');
expect((0, uriComponent_1.isSerialUriComponent)(encoded)).toEqual(true);
});
it('should find a non uri encoded string to indeed be a SerialUriComponent', () => {
const encoded = '& this! p@rt is not!';
expect((0, uriComponent_1.isSerialUriComponent)(encoded)).toEqual(false);
});
});
//# sourceMappingURL=uriComponent.test.js.map