Skip to content

Commit

Permalink
Make test data helpers more 'unique'
Browse files Browse the repository at this point in the history
https://eaflood.atlassian.net/browse/WATER-4144

We've been investigating changing our unit test framework recently (see [Investigate switching to jest](#430) and [water-abstraction-ava](https://github.com/DEFRA/water-abstraction-ava)).

A key issue we'll have if we switch is that most other frameworks run tests asynchronously. This means our pattern of clean-setup-assert won't work. At best we can clean before any tests run but then the test data we setup must not clash.

To achieve that we need to make the test data the helpers generate as unique as possible, which means moving away from hard coded values.

We're still playing with frameworks but there is nothing stopping us making this change now ahead of a decision.

So, this change covers making the helpers generate more unique and fixing any tests that breaks.
  • Loading branch information
Cruikshanks committed Oct 5, 2023
1 parent 7a938b2 commit baa3b5b
Showing 0 changed files with 0 additions and 0 deletions.

0 comments on commit baa3b5b

Please sign in to comment.