dom-utils-test.js 426 B

123456789101112131415
  1. import { encodeIdAttribute, decodeIdAttribute } from '../dom-utils';
  2. describe('DomUtils', () => {
  3. describe('encodeIdAttribute/decodeIdAttribute', () => {
  4. it('encode should be reversible by decode ', () => {
  5. [
  6. '123-abc;<foo>',
  7. ';;<<><>',
  8. '!@#$%^&*()+-\'"',
  9. ].forEach((input) => {
  10. expect(decodeIdAttribute(encodeIdAttribute(input))).toEqual(input);
  11. });
  12. });
  13. });
  14. });