mirror of
https://github.com/FlipsideCrypto/DefinitelyTyped.git
synced 2026-02-06 10:56:53 +00:00
feat(expect.js): bump v0.3.1 adding withArgs
This commit is contained in:
parent
8de599097a
commit
e28977c676
@ -103,6 +103,12 @@ function test_throwException() {
|
||||
expect(fn).to.not.throwException();
|
||||
}
|
||||
|
||||
function test_withArgs() {
|
||||
var fn = () => {};
|
||||
expect(fn).withArgs().to.throwException();
|
||||
expect(fn).withArgs(true, 1, '').to.throwException();
|
||||
}
|
||||
|
||||
function test_within() {
|
||||
expect(1).to.be.within(0, Infinity);
|
||||
}
|
||||
|
||||
@ -101,6 +101,12 @@ function test_throwException() {
|
||||
expect(fn).to.not.throwException();
|
||||
}
|
||||
|
||||
function test_withArgs() {
|
||||
var fn = () => {};
|
||||
expect(fn).withArgs().to.throwException();
|
||||
expect(fn).withArgs(true, 1, '').to.throwException();
|
||||
}
|
||||
|
||||
function test_within() {
|
||||
expect(1).to.be.within(0, Infinity);
|
||||
}
|
||||
|
||||
9
expect.js/expect.js.d.ts
vendored
9
expect.js/expect.js.d.ts
vendored
@ -1,5 +1,5 @@
|
||||
// Type definitions for expect.js 0.2.0
|
||||
// Project: https://github.com/LearnBoost/expect.js
|
||||
// Type definitions for expect.js 0.3.1
|
||||
// Project: https://github.com/Automattic/expect.js
|
||||
// Definitions by: Teppei Sato <https://github.com/teppeis>
|
||||
// Definitions: https://github.com/borisyankov/DefinitelyTyped
|
||||
|
||||
@ -12,6 +12,11 @@ declare module Expect {
|
||||
*/
|
||||
ok(): void;
|
||||
|
||||
/**
|
||||
* Creates an anonymous function which calls fn with arguments.
|
||||
*/
|
||||
withArgs(...args: any[]): Root;
|
||||
|
||||
/**
|
||||
* Assert that the function throws.
|
||||
*
|
||||
|
||||
Loading…
Reference in New Issue
Block a user