Skip to content

Commit 673f532

Browse files
committed
test: assert scientific notation display value
1 parent 220ddc3 commit 673f532

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

tests/decimal.test.tsx

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,12 @@ describe('InputNumber.Decimal', () => {
6565
});
6666

6767
it('should not crash when scientific notation precision exceeds native toFixed limit', () => {
68-
expect(() => render(<InputNumber defaultValue={1e-307} />)).not.toThrow();
68+
const expectedValue = `0.${'0'.repeat(306)}1`;
69+
70+
expect(() => {
71+
const { container } = render(<InputNumber defaultValue={1e-307} />);
72+
expect(container.querySelector('input').value).toEqual(expectedValue);
73+
}).not.toThrow();
6974
});
7075

7176
it('custom decimal separator', () => {

0 commit comments

Comments
 (0)