mirror of
https://github.com/mermaid-js/mermaid.git
synced 2025-10-01 21:29:40 +02:00
test: test partial QuadrantChartConfig options
This commit is contained in:
@@ -26,6 +26,22 @@ describe('when working with site config', function () {
|
||||
expect(cfg.fontFamily).toEqual(directive.fontFamily);
|
||||
expect(cfg.fontSize).toBe(config_0.fontSize);
|
||||
});
|
||||
it('should allow setting partial options', function () {
|
||||
const defaultConfig = configApi.getConfig();
|
||||
|
||||
configApi.setConfig({
|
||||
quadrantChart: {
|
||||
chartHeight: 600,
|
||||
},
|
||||
});
|
||||
|
||||
const updatedConfig = configApi.getConfig();
|
||||
|
||||
// deep options we didn't update should remain the same
|
||||
expect(defaultConfig.quadrantChart!.chartWidth).toEqual(
|
||||
updatedConfig.quadrantChart!.chartWidth
|
||||
);
|
||||
});
|
||||
it('should set reset config properly', function () {
|
||||
const config_0 = { fontFamily: 'foo-font', fontSize: 150 };
|
||||
configApi.setSiteConfig(config_0);
|
||||
|
Reference in New Issue
Block a user