Skip to content

Commit

Permalink
Add unit test
Browse files Browse the repository at this point in the history
  • Loading branch information
sulemanof committed Nov 24, 2020
1 parent d762195 commit 525bbfd
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 0 deletions.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions src/plugins/vis_type_timelion/public/to_ast.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,4 +37,10 @@ describe('timelion vis toExpressionAst function', () => {
const actual = toExpressionAst(vis);
expect(actual).toMatchSnapshot();
});

it('should not escape single quotes', () => {
vis.params.expression = `.es(index=my*,timefield="date",split='test field:3',metric='avg:value')`;
const actual = toExpressionAst(vis);
expect(actual).toMatchSnapshot();
});
});

0 comments on commit 525bbfd

Please sign in to comment.