mirror of
https://github.com/mermaid-js/mermaid.git
synced 2025-09-19 15:30:03 +02:00
fix: Sanitize check in unit test
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
import { describe, expect, it } from 'vitest';
|
||||
import { replaceIconSubstring } from './createText.js';
|
||||
import { sanitizeText } from '../diagram-api/diagramAPI.js';
|
||||
import mermaid from '../mermaid.js';
|
||||
import { replaceIconSubstring } from './createText.js';
|
||||
|
||||
describe('replaceIconSubstring', () => {
|
||||
it('converts FontAwesome icon notations to HTML tags', async () => {
|
||||
@@ -56,7 +57,7 @@ describe('replaceIconSubstring', () => {
|
||||
]);
|
||||
const input = 'Icons galore: fa:fa-bell';
|
||||
const output = await replaceIconSubstring(input);
|
||||
const expected = staticBellIconPack.icons.bell.body;
|
||||
const expected = sanitizeText(staticBellIconPack.icons.bell.body);
|
||||
expect(output).toContain(expected);
|
||||
});
|
||||
});
|
||||
|
Reference in New Issue
Block a user