Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Fix the cases in Unexpected where handlers take too many parameters.
  • Loading branch information
papandreou committed Feb 16, 2017
commit 9af202cf0b18819d4fb3d794217064fe1cfebe09
4 changes: 2 additions & 2 deletions lib/assertions.js
Original file line number Diff line number Diff line change
Expand Up @@ -618,7 +618,7 @@ module.exports = function (expect) {
});
});

expect.addAssertion('<function> not to error', function (expect, subject, arg) {
expect.addAssertion('<function> not to error', function (expect, subject) {
var threw = false;
return expect.promise(function () {
try {
Expand Down Expand Up @@ -661,7 +661,7 @@ module.exports = function (expect) {
}
});

expect.addAssertion('<function> to (throw|throw error|throw exception)', function (expect, subject, arg) {
expect.addAssertion('<function> to (throw|throw error|throw exception)', function (expect, subject) {
try {
subject();
} catch (e) {
Expand Down
4 changes: 2 additions & 2 deletions test/api/fail.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ describe('fail assertion', function () {
describe('with a diff function', function () {
it('should generate the diff', function () {
var clonedExpect = expect.clone();
clonedExpect.addAssertion('<any> to foo', function (expect, subject, value) {
clonedExpect.addAssertion('<any> to foo', function (expect, subject) {
expect.fail({
diff: function (output, diff, inspect, equal) {
return output.text('custom');
Expand All @@ -113,7 +113,7 @@ describe('fail assertion', function () {

it('should support a diff function that uses the old API', function () {
var clonedExpect = expect.clone();
clonedExpect.addAssertion('<any> to foo', function (expect, subject, value) {
clonedExpect.addAssertion('<any> to foo', function (expect, subject) {
expect.fail({
diff: function (output, diff, inspect, equal) {
return {
Expand Down
2 changes: 1 addition & 1 deletion test/external.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ if (typeof process === 'object') {
});

describe('executed through jasmine', function () {
expect.addAssertion('<string> executed through jasmine', function (expect, subject, value) {
expect.addAssertion('<string> executed through jasmine', function (expect, subject) {
return expect.promise(function (run) {
childProcess.execFile(pathModule.resolve(__dirname, '..', 'node_modules', '.bin', 'jasmine'), {
cwd: basePath,
Expand Down