Skip to content

Commit

Permalink
test: add null and undefined test data
Browse files Browse the repository at this point in the history
  • Loading branch information
wjgogogo committed Dec 3, 2021
1 parent 79b749d commit 6f4767d
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/s2-core/__tests__/bugs/issue-860-spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ describe('Column Formatter Tests', () => {
});
test('should get correct row hierarchy with empty row node', () => {
const layoutResult = s2.facet.layoutResult;
expect(layoutResult.rowNodes).toHaveLength(7);
expect(layoutResult.rowLeafNodes).toHaveLength(4);
expect(layoutResult.rowNodes).toHaveLength(8);
expect(layoutResult.rowLeafNodes).toHaveLength(5);
});
});
12 changes: 12 additions & 0 deletions packages/s2-core/__tests__/data/data-issue-860.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,18 @@
"type": "",
"b_sum": 6
},
{
"date": "2021-12-01",
"city": "A市",
"type": "undefined",
"b_sum": 6
},
{
"date": "2021-12-01",
"city": "A市",
"type": null,
"b_sum": 6
},
{
"date": "2021-12-01",
"city": "B市",
Expand Down

0 comments on commit 6f4767d

Please sign in to comment.