Skip to content

Commit

Permalink
test coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
zhaoyongjie committed Jun 2, 2022
1 parent 383ed45 commit f92bf75
Showing 1 changed file with 14 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -83,3 +83,17 @@ test('should be false if time compare is not suffix', () => {
};
expect(isDerivedSeries(series, formDataWithActualTypes)).toEqual(false);
});

test('should be false if series name invalid', () => {
const series = {
id: 123,
name: 123,
data: [100],
};
const formDataWithActualTypes = {
...formData,
comparison_type: ComparisionType.Values,
time_compare: ['1 month ago', '1 month later'],
};
expect(isDerivedSeries(series, formDataWithActualTypes)).toEqual(false);
});

0 comments on commit f92bf75

Please sign in to comment.