mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-08-11 20:40:20 +00:00
Merge pull request #14312 from gmacdougall/correct-jest-toBeCloseTo-signature
Correct Jest toBeCloseTo signature
This commit is contained in:
Vendored
+1
-1
@@ -117,7 +117,7 @@ declare namespace jest {
|
||||
toBe(expected: any): void;
|
||||
toBeCalled(): void;
|
||||
toBeCalledWith(...args: any[]): void;
|
||||
toBeCloseTo(expected: number, delta: number): void;
|
||||
toBeCloseTo(expected: number, delta?: number): void;
|
||||
toBeDefined(): void;
|
||||
toBeFalsy(): void;
|
||||
toBeGreaterThan(expected: number): void;
|
||||
|
||||
@@ -147,6 +147,10 @@ describe('compartion', function () {
|
||||
it('works sanely with simple decimals', function () {
|
||||
expect(0.2 + 0.1).toBeCloseTo(0.3, 5);
|
||||
});
|
||||
|
||||
it('works sanely with simple decimals and the default delta', function () {
|
||||
expect(0.2 + 0.1).toBeCloseTo(0.3);
|
||||
});
|
||||
});
|
||||
|
||||
describe('toThrow API', function () {
|
||||
|
||||
Reference in New Issue
Block a user