mirror of
https://github.com/mermaid-js/mermaid.git
synced 2025-09-18 23:09:49 +02:00
Fix for unit tests after refactoring
This commit is contained in:
@@ -2,7 +2,7 @@ import utils from './utils';
|
||||
import assignWithDepth from './assignWithDepth';
|
||||
import detectType from './diagram-api/detectType';
|
||||
import addDiagrams from './diagram-api/diagram-orchestration';
|
||||
|
||||
import { configureSvgSize, calculateSvgSizeAttrs } from './setupGraphViewbox';
|
||||
addDiagrams();
|
||||
|
||||
describe('when assignWithDepth: should merge objects within objects', function () {
|
||||
@@ -293,13 +293,13 @@ describe('when formatting urls', function () {
|
||||
});
|
||||
describe('when calculating SVG size', function () {
|
||||
it('should return width 100% when useMaxWidth is true', function () {
|
||||
const attrs = utils.calculateSvgSizeAttrs(100, 200, true);
|
||||
const attrs = calculateSvgSizeAttrs(100, 200, true);
|
||||
// expect(attrs.get('height')).toEqual(100);
|
||||
expect(attrs.get('style')).toEqual('max-width: 200px;');
|
||||
expect(attrs.get('width')).toEqual('100%');
|
||||
});
|
||||
it('should return absolute width when useMaxWidth is false', function () {
|
||||
const attrs = utils.calculateSvgSizeAttrs(100, 200, false);
|
||||
const attrs = calculateSvgSizeAttrs(100, 200, false);
|
||||
// expect(attrs.get('height')).toEqual(100);
|
||||
expect(attrs.get('width')).toEqual(200);
|
||||
});
|
||||
|
Reference in New Issue
Block a user