15 lines
627 B
TypeScript
15 lines
627 B
TypeScript
|
import {HTMLEntitiesEncoder} from './htmlentities-encoder';
|
||
|
|
||
|
describe('HTMLEntitiesEncoder', () => {
|
||
|
it('should create an instance', () => {
|
||
|
expect(new HTMLEntitiesEncoder()).toBeTruthy();
|
||
|
});
|
||
|
it('should have the id "encodehtmlentities"', () => {
|
||
|
expect(new HTMLEntitiesEncoder().getId()).toEqual('encodehtmlentities');
|
||
|
});
|
||
|
it('should encode "<span>"Hi" & "Lo"</span>" to "<span>"Hi" & "Lo"</span>"', () => {
|
||
|
expect(new HTMLEntitiesEncoder().convert('<span>"Hi" & "Lo"</span>'))
|
||
|
.toEqual('<span>"Hi" & "Lo"</span>');
|
||
|
});
|
||
|
});
|