Skip to content

Commit

Permalink
test: viewConfig
Browse files Browse the repository at this point in the history
  • Loading branch information
xieliuduo committed Mar 25, 2022
1 parent 7de3755 commit 865961c
Showing 1 changed file with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -309,10 +309,16 @@ describe('should getDataChartRequestParams', () => {
status: 1,
description: '',
};

const viewConfig = JSON.parse(view.config);
const res = getDataChartRequestParams(dataChart as any, view as any, opt);
expect(res.viewId).toBe(dataChart.viewId);
expect(res.filters).toEqual([]);
expect(res.cache).toEqual(viewConfig.cache);
expect(res.cacheExpires).toEqual(viewConfig.cacheExpires);
expect(res.concurrencyControl).toEqual(viewConfig.concurrencyControl);
expect(res.concurrencyControlMode).toEqual(
viewConfig.concurrencyControlMode,
);
});
it('should chart has filter', () => {
const dataChart = {
Expand Down

0 comments on commit 865961c

Please sign in to comment.