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