test(common): add generic parser test
This commit is contained in:
parent
ecf62e3b7a
commit
e19581b540
|
@ -1,4 +1,4 @@
|
|||
import { sanitizeText, removeScript, removeEscapes } from './common';
|
||||
import { sanitizeText, removeScript, removeEscapes, parseGenericTypes } from './common';
|
||||
|
||||
describe('when securityLevel is antiscript, all script must be removed', function () {
|
||||
/**
|
||||
|
@ -103,3 +103,10 @@ describe('Sanitize text', function () {
|
|||
expect(result).not.toContain('javascript:alert(1)');
|
||||
});
|
||||
});
|
||||
|
||||
describe('generic parser', function () {
|
||||
it('should parse generic types', function () {
|
||||
const result = parseGenericTypes('test~T~');
|
||||
expect(result).toEqual('test<T>');
|
||||
});
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue