mardi 16 janvier 2018

Is an assertion required in QUnit even though I use sinon's expects method?

I am testing a javascript file using QUnit. In this test file, I have written a test in which the main test case lays within the expects method which comes from sinon. If the expectation is as it goes, the test should be succeeded. Yet, when I run the test, a message appears with:

Expected at least one assertion, but none were run - call expect(0) to accept zero assertions.

The code which is the core of the test:

var mock = sinon.mock(Class);
mock.expects('method').once();

Aucun commentaire:

Enregistrer un commentaire