Skip to content

Commit e28977c

Browse files
committed
feat(expect.js): bump v0.3.1 adding withArgs
1 parent 8de5990 commit e28977c

File tree

3 files changed

+19
-2
lines changed

3 files changed

+19
-2
lines changed

expect.js/expect.js-commonjs-tests.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,12 @@ function test_throwException() {
103103
expect(fn).to.not.throwException();
104104
}
105105

106+
function test_withArgs() {
107+
var fn = () => {};
108+
expect(fn).withArgs().to.throwException();
109+
expect(fn).withArgs(true, 1, '').to.throwException();
110+
}
111+
106112
function test_within() {
107113
expect(1).to.be.within(0, Infinity);
108114
}

expect.js/expect.js-tests.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,12 @@ function test_throwException() {
101101
expect(fn).to.not.throwException();
102102
}
103103

104+
function test_withArgs() {
105+
var fn = () => {};
106+
expect(fn).withArgs().to.throwException();
107+
expect(fn).withArgs(true, 1, '').to.throwException();
108+
}
109+
104110
function test_within() {
105111
expect(1).to.be.within(0, Infinity);
106112
}

expect.js/expect.js.d.ts

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
// Type definitions for expect.js 0.2.0
2-
// Project: https://github.com/LearnBoost/expect.js
1+
// Type definitions for expect.js 0.3.1
2+
// Project: https://github.com/Automattic/expect.js
33
// Definitions by: Teppei Sato <https://github.com/teppeis>
44
// Definitions: https://github.com/borisyankov/DefinitelyTyped
55

@@ -12,6 +12,11 @@ declare module Expect {
1212
*/
1313
ok(): void;
1414

15+
/**
16+
* Creates an anonymous function which calls fn with arguments.
17+
*/
18+
withArgs(...args: any[]): Root;
19+
1520
/**
1621
* Assert that the function throws.
1722
*

0 commit comments

Comments
 (0)