Tuesday, 21 April 2020

How to test an integration tests suite with mocha and chai?

Hi everyone! I had to write some integration tests using Mocha and Chai. I used to run them with mocha CLI but I was asked to rewrite them in order to make them executable with npm.So, I refactored them creating an index.js file in which I use a Mocha instance and then mocha.run( ).I had to do that because my employers said that the tests I wrote at the beginning were not testable. By changing them this way, I would be able to create some tests to ensure the outputs of my integration tests, given some conditions.​Now, I have two questions:Does it make sense to write tests that basically 'test the original tests'?I tried to find something online but I didn't succed...can anyone help me?​I'm sorry if I messed up with the explanation in English, but I find very hard to describe this situation in a better way

Submitted April 21, 2020 at 03:29PM by DustSeeker

No comments:

Post a Comment