novoda/merlin

Use BDD naming

Mecharyry opened this issue · 1 comments

Problem

We are currently using a JS-like "should" notation for most of our tests in the codebase.

ShouldExpectedBehaviorWhenStateUnderTest

This omits any pre-conditions that need to happen before the test is run to make it successful.

Potential Solution

Remove JS-like "should" notation and replace it with the BDD format of:

givenPreconditions_whenStateUnderTest_thenExpectedBehavior

This will allow us to take into account any preconditions and make the tests much more explicit. When updating the library to use BDD we should also include a test naming entry in the wiki to explain to external collaborators the different variations on naming we will accept.

Impact

Make tests easier to read and allow for preconditions.

This has been addressed and will be part of v1.0.0 release.