mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-08-11 12:30:18 +00:00
Merge pull request #9763 from kidmillions/patch-1
Add .isAtMost() .isAtLeast() to chai.assert defin.
This commit is contained in:
@@ -1930,6 +1930,24 @@ suite('assert', () => {
|
||||
}, 'expected 5 to be below 5');
|
||||
});
|
||||
|
||||
test('isAtLeast', () => {
|
||||
assert.isAtLeast(5, 3);
|
||||
assert.isAtLeast(5, 5);
|
||||
|
||||
err(() => {
|
||||
assert.isAtLeast(3, 5);
|
||||
}, 'expected 3 to be greater than or equal to 5');
|
||||
});
|
||||
|
||||
test('isAtMost', () => {
|
||||
assert.isAtMost(3, 5);
|
||||
assert.isAtMost(5, 5);
|
||||
|
||||
err(() => {
|
||||
assert.isAtMost(5, 3);
|
||||
}, 'expected 5 to be less than or equal to 3');
|
||||
});
|
||||
|
||||
test('extensible', () => { assert.extensible({}); });
|
||||
test('isExtensible', () => { assert.isExtensible({}); });
|
||||
test('notExtensible', () => { assert.notExtensible(Object.preventExtensions({})); });
|
||||
|
||||
Vendored
+3
@@ -271,6 +271,9 @@ declare namespace Chai {
|
||||
isAbove(val: number, abv: number, msg?: string): void;
|
||||
isBelow(val: number, blw: number, msg?: string): void;
|
||||
|
||||
isAtMost(val: number, atmst: number, msg?: string): void;
|
||||
isAtLeast(val: number, atlst: number, msg?: string): void;
|
||||
|
||||
isFunction(val: any, msg?: string): void;
|
||||
isNotFunction(val: any, msg?: string): void;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user