-
Notifications
You must be signed in to change notification settings - Fork 33
Test an Action Defined in MSON
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.mockAction()
to mock the actions and any globals - Executes the
.run()
method on the action - Uses
testUtils.expectActsToContain()
to ensure that the proper actions were performed
See the should log in to app and redirect when redirectAfterLogin test for a good example.