Skip to content
This repository was archived by the owner on Jun 24, 2022. It is now read-only.

Testing

Yury Delendik edited this page Feb 15, 2018 · 6 revisions

The WebAssembly Studio mostly relies on unit tests to verify the functionality. The architecture (react + flux) was chosen just for this reason. We are using the jest as our testing platform.

Execution

The tests are executed by running npm run test command. That includes execution of:

It's possible to run just the unit tests using jest command. Running it via the jest command allows, e.g. to specify the particular test, update the snapshot, etc.

Creation of a unit test

The unit tests are location at the "tests/" folder and further grouped by particular component or action. To verify the components state we are using enzyme testing utilities.

The jest allows to replace modules with mocks -- that will allow to simply unit test creation.

Note: The project is at its first iterations and is migrated from the pilot code. It is essential to add (unit) test to existing code first.

References

Clone this wiki locally