Skip to content

Commit

Permalink
test(ava/data): add tests for infinite loop issue
Browse files Browse the repository at this point in the history
  • Loading branch information
LAI-X committed Mar 15, 2024
1 parent 6d42357 commit 5c2fed6
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions packages/ava/__tests__/unit/data/analysis/field/index.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -443,3 +443,17 @@ test('date cols not boolean', () => {
expect(d.minimum).toBe('2019-01-01');
expect(d.maximum).toBe('2019-01-02');
});

test('recommendation hitting both float and Date types', () => {
const data = ['7007093.11', '2074.6'];
const d = analyzeField(data);
expect(d.type).toBe('mixed');
expect(d.recommendation).toBe('float');
});

test('recommendation hitting both integer and Date types', () => {
const data = ['32', '1980'];
const d = analyzeField(data);
expect(d.type).toBe('mixed');
expect(d.recommendation).toBe('integer');
});

0 comments on commit 5c2fed6

Please sign in to comment.