Skip to content

Commit

Permalink
Fixed the corresponding test.
Browse files Browse the repository at this point in the history
  • Loading branch information
zerline committed Jun 4, 2019
1 parent a41bdce commit 3ba00ad
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion tests/test-rendermime/src/factories.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -135,14 +135,15 @@ describe('rendermime/factories', () => {
describe('#createRenderer()', () => {
it('should create an img element with the uri encoded svg inline', async () => {
const source = '<svg></svg>';
const displaySource = '<svg xmlns="http://www.w3.org/2000/svg"></svg>';
const f = svgRendererFactory;
const mimeType = 'image/svg+xml';
const model = createModel(mimeType, source, true);
const w = f.createRenderer({ mimeType, ...defaultOptions });
await w.renderModel(model);
const imgEl = w.node.getElementsByTagName('img')[0];
expect(imgEl).to.be.ok;
expect(imgEl.src).to.contain(encodeURIComponent(source));
expect(imgEl.src).to.contain(encodeURIComponent(displaySource));
});
});
});
Expand Down

0 comments on commit 3ba00ad

Please sign in to comment.