cjohansen / sinon-qunit

A small Sinon.JS adapter for QUnit that provides automatic sandboxing of mocks and stubs
http://cjohansen.no/sinon/qunit
Other
26 stars 12 forks source link

Fixing test.callback is null error #17

Open eoinof opened 7 years ago

eoinof commented 7 years ago

Encountered an error in qunit-2.1.1.js:1054 when running tests.

line > promise = test.callback.call(test.testEnvironment, test.assert); error > test.callback is null

Using sinon-1.17.6.js sinon-ie-1.17.6.js sinon-qunit-1.0.0.js

eoinof commented 7 years ago

I encountered this issue when upgrading qunit/sinon..

alexandrefreire commented 7 years ago

I ran into the same issue as @eoinof today and was just about to commit a very similar patch.

I do believe we can drop the if statement now that QUnit 2 doesn't support a second "expected" number of tests that should run too.

Would love to see this, are there plans for a new release that supports QUnit 2 @cjohansen?

thanks so much for this plugin

Cameron-C-Chapman commented 7 years ago

+1

I ran into the same issue and this was the fix for me.