Files
sentinel/static/app/utils/sanitizeQuerySelector.spec.tsx
2024-02-15 17:01:50 +00:00

12 lines
420 B
TypeScript

import {sanitizeQuerySelector} from 'sentry/utils/sanitizeQuerySelector';
describe('sanitizeQuerySelector', function () {
it('replaces all spaces with a hyphen', function () {
expect(sanitizeQuerySelector('foo bar baz bar foo')).toBe('foo-bar-baz-bar-foo');
});
it('replaces colons with a hyphen', function () {
expect(sanitizeQuerySelector('foo:bar:baz bar foo')).toBe('foo-bar-baz-bar-foo');
});
});