jeudi 20 août 2015

How would you write a test suite in TDD for this?

I'd like to write a test suite using the TDD methodology for this feature:

The test(x, y, z) function should return true if x is true and also y or z are true.

I want a 100% code coverage.
Please describe the intermediary code that you wrote during the process and the final test suite you can use Jasmine pseudo-syntax, for example:

it('should return true if x is a dog', function () { ... });

The reason I'm asking for this is that I'm trying to figure out the correct way to write a test suite for boolean expressions.

Thanks!

Aucun commentaire:

Enregistrer un commentaire