Skip to content

Commit

Permalink
(test) update tests for diff and preview components
Browse files Browse the repository at this point in the history
  • Loading branch information
liammann committed Oct 15, 2018
1 parent 6d75a39 commit fe0a2da
Show file tree
Hide file tree
Showing 2 changed files with 137 additions and 15 deletions.
129 changes: 120 additions & 9 deletions src/component/diff.component.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { Component, OnInit, DebugElement, ViewChild } from "@angular/core";
import { ComponentFixture, TestBed, async } from "@angular/core/testing";
import { By } from "@angular/platform-browser";

import { RealMarkModule, DiffComponent } from "../ng-realmark";
import { RealMarkModule, DiffComponent, RealMarkService} from "../ng-realmark";



Expand All @@ -12,27 +12,86 @@ import { RealMarkModule, DiffComponent } from "../ng-realmark";
*/
@Component({
template: `
<realmark-diff [content]="markdown" [original]="markdownOriginal">Input Test</realmark-diff>
<realmark-diff [content]="markdown" [original]="markdownOriginal" [codeBlock]="codeBlock">Input Test</realmark-diff>
`
})
export class TestHostComponent {
public markdownOriginal = "# Concipit iter";
public markdown = "# Concipit new word iter";
public markdown = "TEST_CASE_1";
public codeBlock = "js"
}


export class MockService extends RealMarkService {
compareMarkdown(content, original, showDeleted, showMarkdown, codeBlock){
switch (content) {
case "TEST_CASE_1":
return [
{type: "deleted", text: "This is a paragraph.", originalLine: 1, newLine: 1, format: "text"},
{type: "added", text: "This is the first paragraph.", originalLine: 1, newLine: 1, format: "text"},
{type: "line", text: "", originalLine: 2, newLine: 2, format: "text"},
{type: "line", text: "this is the second paragraph", originalLine: 3, newLine: 3, format: "text"},
{type: "line", text: "", originalLine: 4, newLine: 4, format: "text"},
{type: "line", text: "this is the third paragraph", originalLine: 5, newLine: 5, format: "text"}
];
break;

case "TEST_CASE_2":
return [
{type: "added", text: "TEST 2 This is the first paragraph.", originalLine: 1, newLine: 1, format: "text"},
{type: "line", text: "", originalLine: 2, newLine: 2, format: "text"},
{type: "line", text: "this is the second paragraph", originalLine: 3, newLine: 3, format: "text"},
];
break;

case "TEST_CASE_3":
return [
{type: "line", text: "# Heading 1", originalLine: 1, newLine: 1, format: "text"},
{type: "added", text: "This is the new paragraph.", originalLine: 2, newLine: 2, format: "text"},
{type: "line", text: "this is the 1st paragraph", originalLine: 3, newLine: 2, format: "text"},
{type: "line", text: "this is the 2nd paragraph", originalLine: 4, newLine: 3, format: "text"}
];
break;
case "TEST_CASE_4":
return [
{type: "line", text: "# Test case 4", originalLine: 1, newLine: 1, format: "markdon"},
{type: "added", text: "This is the new paragraph.", originalLine: 2, newLine: 2, format: "markdon"},
{type: "line", text: "this is the 1st paragraph", originalLine: 3, newLine: 2, format: "markdon"},
{type: "line", text: "this is the 2nd paragraph", originalLine: 4, newLine: 3, format: "markdon"}
];
break;

case "TEST_CASE_5":
return [
{type: "line", text: "function getDate(){", originalLine: 1, newLine: 1, format: "code"},
{type: "added", text: " var test = 20;", originalLine: 2, newLine: 2, format: "code"},
{type: "added", text: " return test;", originalLine: 3, newLine: 3, format: "code"},
{type: "added", text: "}", originalLine: 4, newLine: 4, format: "code"},
]
break;
}
};
}

///////////////////////////////////////////////////////////
describe("Diff", () => {

let comp:TestHostComponent;
let fixture:ComponentFixture<TestHostComponent>;
let diff:DiffComponent;
let diffElement:DebugElement;

let spy: any;

beforeEach(() => {
TestBed.configureTestingModule({
imports: [ FormsModule, RealMarkModule.forRoot({flavor: 'github', headerLinks: true})],
declarations: [TestHostComponent] // declare the test component
}).overrideComponent(DiffComponent, {
set: {
providers: [
{provide: RealMarkService, useClass: MockService}
]
}
});

fixture = TestBed.createComponent(TestHostComponent);
Expand All @@ -49,11 +108,63 @@ describe("Diff", () => {
expect(diffElement.nativeElement.innerHTML).toContain('Input Test');
fixture.detectChanges();
fixture.whenStable().then(() => {
// let result = '<tr class="diff-deleted"><td class="diff-num1">1</td><td class="diff-num2">1</td><td width="100%"><h1><a class="anchor" href="http://localhost:9876/context.html#concipit-iter"></a>Concipit iter</h1></td></tr>';
// expect(diffElement.nativeElement.innerHTML).toContain(result);
//
// let result = '<tr class="diff-added"><td class="diff-num1">1</td><td class="diff-num2">2</td><td width="100%"><h1><a class="anchor" href="http://localhost:9876/context.html#concipit-new-word-iter"></a>Concipit new word iter</h1></td></tr></tbody></table>';
// expect(diffElement.nativeElement.innerHTML).toContain(result);
let testSuccess = '<table><tbody><tr class="diff-deleted"><td class="diff-num1">1</td><td class="diff-num2">1</td><td width="100%"><p>This is a paragraph.</p></td></tr>\n<tr class="diff-added"><td class="diff-num1">1</td>';

expect(diffElement.nativeElement.innerHTML).toContain(testSuccess);
});
done();
});


it("should display the correct comparison table - hide deletions", done => {

comp.markdown = "TEST_CASE_2";

fixture.detectChanges();
fixture.whenStable().then(() => {
let testSuccess = '<table><tbody><tr class="diff-added"><td class="diff-num1">1</td><td class="diff-num2">1</td><td width="100%"><p>TEST 2 This is the first paragraph.</p></td></tr>';
expect(diffElement.nativeElement.innerHTML).toContain(testSuccess);
});
done();
});

it("should display the correct comparison table - Markdown to HTML", done => {

comp.markdown = "TEST_CASE_3";

fixture.detectChanges();
fixture.whenStable().then(() => {
let testSuccess = '<tr class="diff-line"><td class="diff-num1">1</td><td class="diff-num2">1</td><td width="100%"><h1><a class="anchor" ';
expect(diffElement.nativeElement.innerHTML).toContain(testSuccess);
let testSuccess2 = '#heading-1"></a>Heading 1</h1></td></tr>';
expect(diffElement.nativeElement.innerHTML).toContain(testSuccess2);

});
done();
});

it("should display the correct comparison table - show markdown tags", done => {

comp.markdown = "TEST_CASE_4";

fixture.detectChanges();
fixture.whenStable().then(() => {
let testSuccess = '<tbody><tr class="diff-line"><td class="diff-num1">1</td><td class="diff-num2">1</td><td width="100%"> # Test case 4</td></tr>\n<tr class="diff-added"><td class="diff-num1">2</td><td class="diff-num2">2</td><td width="100%"> This is the new paragraph.</td></tr>\n<tr class="diff-line"><td class="diff-num1">3</td><td class="diff-num2">2</td><td width="100%"> this is the 1st paragraph</td></tr>\n<tr class="diff-line"><td class="diff-num1">4</td><td class="diff-num2">3</td><td width="100%"> this is the 2nd paragraph</td></tr></tbody>';
expect(diffElement.nativeElement.innerHTML).toContain(testSuccess);

});
done();
});

it("should display the correct comparison table - code", done => {

comp.markdown = "TEST_CASE_5";

fixture.detectChanges();
fixture.whenStable().then(() => {
let testSuccess = '<tbody><tr class="diff-line"><td class="diff-num1">1</td><td class="diff-num2">1</td><td width="100%"><pre class="language-js"><code class="language-js"><span class="token keyword">function</span> <span class="token function">getDate</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">{</span></code></pre></td></tr>\n<tr class="diff-added"><td class="diff-num1">2</td><td class="diff-num2">2</td><td width="100%"><pre class="language-js"><code class="language-js"> <span class="token keyword">var</span> test <span class="token operator">=</span> <span class="token number">20</span><span class="token punctuation">;</span></code></pre></td></tr>';
expect(diffElement.nativeElement.innerHTML).toContain(testSuccess);

});
done();
});
Expand Down
23 changes: 17 additions & 6 deletions src/component/previewer.component.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,26 +48,29 @@ describe("Previewer", () => {
expect(comp.sidebarHeadings).toBeUndefined();

fixture.detectChanges();
expect(previewerElement.nativeElement.innerHTML).toBe('<div><h1 id="concipit-iter"><a class="anchor" href="http://localhost:9876/context.html#concipit-iter" aria-hidden="true"><svg aria-hidden="true" class="octicon octicon-link" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>Concipit iter</h1></div>');
expect(previewerElement.nativeElement.innerHTML).toContain('<div><h1 id="concipit-iter"><a class="anchor" href="');

expect(previewerElement.nativeElement.innerHTML).toContain('" aria-hidden="true"><svg aria-hidden="true" class="octicon octicon-link" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>Concipit iter</h1></div>');
fixture.detectChanges();
fixture.whenStable().then(() => {
expect(comp.sidebarHeadings).toEqual([ Object({ value: 'Concipit iter', depth: '1', link: 'concipit-iter' }) ]);
done();
})
});
it("update <realmark-previewer> with new content", done => {
it("update with new content", done => {
comp.markdown = '# Concipit new content';

fixture.detectChanges();
fixture.whenStable().then(() => {
expect(previewerElement.nativeElement.innerHTML).toBe('<div><h1 id="concipit-new-content"><a class="anchor" href="http://localhost:9876/context.html#concipit-new-content" aria-hidden="true"><svg aria-hidden="true" class="octicon octicon-link" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>Concipit new content</h1></div>');
expect(previewerElement.nativeElement.innerHTML).toContain('<div><h1 id="concipit-new-content"><a class="anchor" href="');
expect(previewerElement.nativeElement.innerHTML).toContain('" aria-hidden="true"><svg aria-hidden="true" class="octicon octicon-link" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>Concipit new content</h1></div>');
expect(comp.sidebarHeadings).toEqual([ Object({ value: 'Concipit new content', depth: '1', link: 'concipit-new-content' }) ]);
done();
});

});

it("Table of contents handles duplicate headings correctly", done => {
it("table of contents handles duplicate headings correctly", done => {
comp.markdown = '# Concipit new content\n Blah djfsjsdf fsdjfsdj dfsbhfdsewruweru\n\n# Concipit new content\n Blah djfsjsdf fsdjfsdj dfsbhfdsewruweru\n\n Blah djfsjsdf fsdjfsdj dfsbhfdsewruweru\n\n\n# Concipit new content\n Blah djfsjsdf fsdjfsdj dfsbhfdsewruweru\n\n# Concipit new content\n Blah djfsjsdf fsdjfsdj dfsbhfdsewruweru\n ';

fixture.detectChanges();
Expand All @@ -80,13 +83,21 @@ describe("Previewer", () => {

});

it("<realmark-previewer> kitchen sink test", done => {
it("kitchen sink test", done => {
comp.markdown = 'This is a paragraph.\n\n\# Header 1\n## Header 2\n### Header 3\n#### Header 4\n##### Header 5\n###### Header 6\n\n\n\n![Alt Text](http://placehold.it/200x50 "Image Title")\n';

fixture.detectChanges();
fixture.whenStable().then(() => {

let result = '<div><p>This is a paragraph.</p>\n<h1 id="header-1"><a class="anchor" href="http://localhost:9876/context.html#header-1" aria-hidden="true"><svg aria-hidden="true" class="octicon octicon-link" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>Header 1</h1>\n<h2 id="header-2"><a class="anchor" href="http://localhost:9876/context.html#header-2" aria-hidden="true"><svg aria-hidden="true" class="octicon octicon-link" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>Header 2</h2>\n<h3 id="header-3"><a class="anchor" href="http://localhost:9876/context.html#header-3" aria-hidden="true"><svg aria-hidden="true" class="octicon octicon-link" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>Header 3</h3>\n<h4 id="header-4"><a class="anchor" href="http://localhost:9876/context.html#header-4" aria-hidden="true"><svg aria-hidden="true" class="octicon octicon-link" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>Header 4</h4>\n<h5 id="header-5"><a class="anchor" href="http://localhost:9876/context.html#header-5" aria-hidden="true"><svg aria-hidden="true" class="octicon octicon-link" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>Header 5</h5>\n<h6>Header 6</h6>\n<p><img src="http://placehold.it/200x50" alt="Alt Text" title="Image Title"></p></div>';
let result = '<div><p>This is a paragraph.</p>\n<h1 id="header-1"><a class="anchor" href="';
expect(previewerElement.nativeElement.innerHTML).toContain('" aria-hidden="true"><svg aria-hidden="true" class="octicon octicon-link" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>Header 1</h1>\n<h2 id="header-2"><a class="anchor" href="');

expect(previewerElement.nativeElement.innerHTML).toContain('#header-2" aria-hidden="true"><svg aria-hidden="true" class="octicon octicon-link" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>Header 2</h2>\n<h3 id="header-3"><a class="anchor" href="');

expect(previewerElement.nativeElement.innerHTML).toContain('#header-3" aria-hidden="true"><svg aria-hidden="true" class="octicon octicon-link" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>Header 3</h3>\n<h4 id="header-4"><a class="anchor" href="');

expect(previewerElement.nativeElement.innerHTML).toContain('#header-4" aria-hidden="true"><svg aria-hidden="true" class="octicon octicon-link" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>Header 4</h4>\n<h5 id="header-5"><a class="anchor" href="');
expect(previewerElement.nativeElement.innerHTML).toContain('#header-5" aria-hidden="true"><svg aria-hidden="true" class="octicon octicon-link" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>Header 5</h5>\n<h6>Header 6</h6>\n<p><img src="http://placehold.it/200x50" alt="Alt Text" title="Image Title"></p></div>';

expect(previewerElement.nativeElement.innerHTML).toContain(result);

Expand Down

0 comments on commit fe0a2da

Please sign in to comment.