jeudi 28 mai 2015

Mocha Test Fails with AssertionError

In JUnit (Java) the result of a unit test is either a succes, failure or error.

When i try to run a test with Mocha i either get a succes or assertion error.

Is is normally to get an AssertionError for failure tests? (shouldn't it just be called an failure and not an error?)

AssertionError: -1 == 2 + expected - actual

What about testing asynchronous code? When my tests fail i get an Uncaught eror? Is that normal?

Like this:

Uncaught Error: expected 200 to equal 201

Aucun commentaire:

Enregistrer un commentaire