When building React applications you will most likely find yourself using Jest as your testing framework. Jest has some really, really cool features built in. But when you use Enzyme you can take your testing to the nest level. One really cool feature is the ability to test click events via Enzyme to ensure your …
Category: React
Multi-Environment Deployments with React
If you are using Create-React-App to scaffold your react application there is built in support for changing environment variables based on the NODE_ENV values, this is done by using .env files. In short this process works by having a .env, .env.production, .env.development set of files. When you run/build your application CRA will set the NODE_ENV value …
Sinon Error: Attempted to wrap undefined property ‘XYZ as function
I ran into a fun little error recently when working on a ReactJs application. In my application I was using SinonJs to setup some spies on a method, I wanted to capture the input arguments for verification. However, when I ran my test I received the following error. Attempted to wrap undefined property handlOnAccountFilter as …
Continue reading Sinon Error: Attempted to wrap undefined property ‘XYZ as function