-
Notifications
You must be signed in to change notification settings - Fork 33
Testing Aggregate Components
Geoff Cox edited this page Dec 13, 2020
·
1 revision
The test-utils
contains helper methods that you can use to test your actions. We recommend a test structure that:
- Uses
compiler.newComponent()
to instantiate the JS code from MSON - Uses
testUtils.mockComponentListeners()
to mock the actions, globals, registrars, etc... - Executes the
.runListeners()
method on the component - Uses
testUtils.expectActsToContain()
to ensure that the proper actions were performed
See the should reset password test for a good example.