Repository URL to install this package:
|
Version:
1.2.9 ▾
|
"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
// @flow
const escape_1 = __importDefault(require("../escape"));
describe('escape', () => {
it('replaces characters that could be part of CSS selectors', () => {
expect(escape_1.default('foo(bar):#*$><+~=|^baz')).toEqual('foo-bar-baz');
});
it('replaces double hyphens with a single hyphen', () => {
expect(escape_1.default('foo--bar')).toEqual('foo-bar');
});
it('removes extraneous hyphens at the ends of the string', () => {
expect(escape_1.default('-foo--bar-')).toEqual('foo-bar');
});
});
//# sourceMappingURL=escape.test.js.map