question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Investigate testing React apps with ses enabled

See original GitHub issue

What 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:open
  • Created 2 years ago
  • Comments:9 (9 by maintainers)

github_iconTop GitHub Comments

1reaction
samsiegartcommented, Oct 12, 2021

Opened https://github.com/facebook/jest/issues/11952 to see if the Jest team can offer any help

0reactions
samsiegartcommented, Oct 9, 2021

I uploaded the code I was testing with to a repo here https://github.com/samsiegart/jest-ses

Read more comments on GitHub >

github_iconTop Results From Across the Web

Testing Overview - React
React Testing Library is a set of helpers that let you test React components without relying on their implementation details.
Read more >
Modified ArrayBuffer exception when running Jest with SES ...
I am using SES in my application. Part of what SES does is freezes certain objects and types, like ArrayBuffer . It does...
Read more >
Amazon SES Sending review process FAQs
We monitor the email that's sent through Amazon SES to make sure that the service isn't being used to deliver malicious, unsolicited, or...
Read more >
Testing React Apps - Jest
At Facebook, we use Jest to test React applications. ... If you are new to React, we recommend using Create React App. It...
Read more >
S3 api actions
Have the web application poll the DynamoDB table to reflect this change. ... Any data your users send Instant access to the Amazon...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found