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