mirror of
https://github.com/mermaid-js/mermaid.git
synced 2025-01-28 07:03:17 +08:00
Replace regex with contain match
This commit is contained in:
parent
df94d3994d
commit
3b2b8dacd8
@ -203,12 +203,10 @@ describe('mermaidAPI', () => {
|
|||||||
const base64encodedSrc = toBase64(
|
const base64encodedSrc = toBase64(
|
||||||
'<body style="' + 'margin:0' + '">' + inputSvgCode + '</body>'
|
'<body style="' + 'margin:0' + '">' + inputSvgCode + '</body>'
|
||||||
);
|
);
|
||||||
const expectedRegExp = new RegExp(
|
const expectedSrc = 'src="data:text/html;charset=UTF-8;base64,' + base64encodedSrc + '"'
|
||||||
'src="data:text/html;charset=UTF-8;base64,' + base64encodedSrc + '"'
|
|
||||||
);
|
|
||||||
|
|
||||||
const result = putIntoIFrame(inputSvgCode);
|
const result = putIntoIFrame(inputSvgCode);
|
||||||
expect(result).toMatch(expectedRegExp);
|
expect(result).toContain(expectedSrc);
|
||||||
});
|
});
|
||||||
|
|
||||||
it('uses the height and appends px from the svgElement given', () => {
|
it('uses the height and appends px from the svgElement given', () => {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user