Skip to content

Commit

Permalink
Add unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
VladLasitsa committed May 17, 2022
1 parent f649fcb commit 84ab90e
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 0 deletions.

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

Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,25 @@ describe('xyVis', () => {
).rejects.toThrowErrorMatchingSnapshot();
});

test('it should throw error if addTimeMarker applied for not time chart', async () => {
const { data, args } = sampleArgs();
const { layers, ...rest } = args;
const { layerId, layerType, table, type, ...restLayerArgs } = sampleLayer;
expect(
xyVisFunction.fn(
data,
{
...rest,
...restLayerArgs,
addTimeMarker: true,
referenceLineLayers: [],
annotationLayers: [],
},
createMockExecutionContext()
)
).rejects.toThrowErrorMatchingSnapshot();
});

test('it should throw error if splitRowAccessor is pointing to the absent column', async () => {
const { data, args } = sampleArgs();
const { layers, ...rest } = args;
Expand Down

0 comments on commit 84ab90e

Please sign in to comment.