Skip to content

Latest commit

 

History

History

testing

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Testing

The testing package contains common mocks and test data to use across the monorepo.

Builders

Builders are using test-data-bot to generate data structures according to our types. It is reasonably flexible, allowing to create variations by using traits and using overrides, have some random and/or fixed fields and use builders within builders.

Handlers

Handlers are for Mock Service Worker to use in mock API responses. It can be used both in tests as well as client side when needed. handlers.ts responses are loaded by default, but you can override via server.use and injecting a rest.get to override an existing handler.

Mocks

The mocks are all blank apart from the API and getRandomValues. The simple API mock is necessary to allow the use of MSW.