Investigate testing React apps with ses enabled
See original GitHub issueWhat is the Problem Being Solved?
Jest is the default testing environment for create-react-app, but it does not work out of the box with ses. When calling lockdown, the following error occurs:
Unexpected intrinsic intrinsics.ArrayBuffer.__proto__ at %FunctionPrototype%
(context: https://github.com/Agoric/agoric-sdk/commit/2abb793a9444a105409f896e19989a33bd24ea6a)
Description of the Design
Ava is the more supported testing environment for ses, so we should attempt to switch a fresh create-react-app to use Ava instead of Jest and document the complexity of such work. If this works, there will at least be a way to write unit tests for react apps that use ses. Then, take a deeper dive into Jest to figure out where it’s breaking, and perhaps open an issue for that.
Acceptance Criteria
Establish a working pattern for writing react tests in ses (in either Ava or Jest). If Jest is not supported, decide on the priority and feasibility of implementing support for it.
Issue Analytics
- State:
- Created 2 years ago
- Comments:9 (9 by maintainers)

Top Related StackOverflow Question
Opened https://github.com/facebook/jest/issues/11952 to see if the Jest team can offer any help
I uploaded the code I was testing with to a repo here https://github.com/samsiegart/jest-ses