lundi 22 juin 2015

How to write a test suite for a logger?

I write a simple logger for my projects, and I split it to a single project. http://ift.tt/1H9zj2p

I think I will use Mocha, but I am not sure, how to write a test for it:

  • It will create files, so I need to let it create, check content of the file and delete it after testing?
  • It will output to console, so I need to check the stdout and the stderr when testing?

Am I right?

Aucun commentaire:

Enregistrer un commentaire