Developer Docs

Client-side tests with C#Bot

The client-side testing framework for a C#Bot application utilises Jest and Enzyme to write unit tests which ensure individual components are working as intended. Jest is a testing framework which is used to write and run the tests and make assertions, whereas Enzyme is a tool which allows for simulating and interacting with React components.

The bot-written client-side tests for a C#Bot application can be found in ‘clientside/src/__tests__/botwritten’.

You can use yarn to run the client-side tests using the following command:

yarn test

This will activate watch mode which waits for any modification to a client-side file, and then reruns the tests. This mode also offers multiple other options which can be used to either run all of the tests manually, or filter the tests by file name, test name, or by tests that have previously failed.

Image

On this page