mirror of
https://github.com/mermaid-js/mermaid.git
synced 2025-09-23 17:29:54 +02:00
chore: Reset mock in edgeMarker test
This commit is contained in:
@@ -1,14 +1,19 @@
|
|||||||
|
import type { Mocked } from 'vitest';
|
||||||
import type { SVG } from '../diagram-api/types.js';
|
import type { SVG } from '../diagram-api/types.js';
|
||||||
import { addEdgeMarkers } from './edgeMarker.js';
|
import { addEdgeMarkers } from './edgeMarker.js';
|
||||||
|
|
||||||
describe('addEdgeMarker', () => {
|
describe('addEdgeMarker', () => {
|
||||||
const svgPath = {
|
const svgPath = {
|
||||||
attr: vitest.fn(),
|
attr: vitest.fn(),
|
||||||
} as unknown as SVG;
|
} as unknown as Mocked<SVG>;
|
||||||
const url = 'http://example.com';
|
const url = 'http://example.com';
|
||||||
const id = 'test';
|
const id = 'test';
|
||||||
const diagramType = 'test';
|
const diagramType = 'test';
|
||||||
|
|
||||||
|
beforeEach(() => {
|
||||||
|
svgPath.attr.mockReset();
|
||||||
|
});
|
||||||
|
|
||||||
it('should add markers for arrow_cross:arrow_point', () => {
|
it('should add markers for arrow_cross:arrow_point', () => {
|
||||||
const arrowTypeStart = 'arrow_cross';
|
const arrowTypeStart = 'arrow_cross';
|
||||||
const arrowTypeEnd = 'arrow_point';
|
const arrowTypeEnd = 'arrow_point';
|
||||||
|
Reference in New Issue
Block a user