Skip to content

Commit

Permalink
Restructured the build function and addressed more review comment
Browse files Browse the repository at this point in the history
  • Loading branch information
subhash-halder committed May 12, 2023
1 parent fe9c109 commit 1ff82e0
Show file tree
Hide file tree
Showing 10 changed files with 252 additions and 147 deletions.
Original file line number Diff line number Diff line change
@@ -1,8 +1,3 @@
/** mermaid
* https://knsv.github.io/mermaid
* (c) 2015 Knut Sveidqvist
* MIT license.
*/
%lex
%options case-insensitive

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// @ts-ignore
// @ts-ignore: TODO Fix ts errors
import { parser } from './quadrant.jison';
import { Mock, vi } from 'vitest';

Expand Down Expand Up @@ -45,7 +45,7 @@ describe('Testing quadrantChart jison file', () => {
});

it('should be able to parse directive', () => {
let str =
const str =
'%%{init: {"quadrantChart": {"chartWidth": 600, "chartHeight": 600} } }%% \n quadrantChart';
expect(parserFnConstructor(str)).not.toThrow();
expect(mockDB.parseDirective.mock.calls[0]).toEqual(['%%{', 'open_directive']);
Expand Down Expand Up @@ -242,7 +242,7 @@ describe('Testing quadrantChart jison file', () => {
});

it('should be able to parse the whole chart', () => {
let str = `%%{init: {"quadrantChart": {"chartWidth": 600, "chartHeight": 600} } }%%
const str = `%%{init: {"quadrantChart": {"chartWidth": 600, "chartHeight": 600} } }%%
quadrantChart
title Analytics and Business Intelligence Platforms
x-axis "Completeness of Vision ❤" --> "x-axis-2"
Expand Down
Loading

0 comments on commit 1ff82e0

Please sign in to comment.