test(aio): add test for escaped newline in CodeComponent

This commit is contained in:
Peter Bacon Darwin 2017-04-10 22:22:18 +01:00 committed by Hans
parent 9037593ab8
commit 04fb29b589
1 changed files with 2 additions and 2 deletions

View File

@ -107,10 +107,10 @@ describe('CodeComponent', () => {
it('should remove common indentation from the code before rendering', () => {
hostComponent.linenums = false;
hostComponent.code = ' abc\n def\n ghi\n\n jkl\n';
hostComponent.code = ' abc\n let x = text.split(\'\\n\');\n ghi\n\n jkl\n';
fixture.detectChanges();
const codeContent = codeComponentDe.nativeElement.querySelector('code').innerText;
expect(codeContent).toEqual('abc\n def\nghi\n\njkl');
expect(codeContent).toEqual('abc\n let x = text.split(\'\\n\');\nghi\n\njkl');
});
it('should trim whitespace from the code before rendering', () => {