Testing Implementation - worldscapes/engine GitHub Wiki

Testing Tools

Testing tools are implemented as part of ApiTools which are provided as part of Engine package.

Testing itself is based on Jest testing framework and can be used along with common Jest tests from *.test.ts files.

For every (in future) Api class there is ${ApiClassName}Tools namespace which contains runTests() function. This function runs test suite that can be used both for built-in and custom Api implementations.

Every ApiTools have their own signature depending on needs of a class, but usually it's description that you want to see as suite tag in report plus initializer for all needed entities. Initializer is called to construct tested entity and can return any implementation that follows Api.