Out NestJS tests are intermittently failing with “not enough memory” error being thrown. There is nothing really special about the tests except for the fact that it is growing as the project grows. It turns out a simple CLI parameter can mitigate the issue.
I’ve found the solution in CircleCI forum and the fix was to pass the parameter
-w 1 which effectively runs the test in a single thread.
yarn run test
yarn run test -w 1
When I tried to run the test locally with the same command, the process takes a little more time to complete compared to the regular
yarn run test which is probably because it uses some form of parallel processing. Running it on single thread on CircleCI doesn’t have any impact on us at all and it even speed up the build process.
Posted in NodeJS
I just wanted to test that a certain async call should throw an error and I tried it on Jest. I’m already familiar with RSpec which has similar syntax. Below is what I did. The exec method is an async … Continue reading
I was playing around with MongoDB ReplicaSet yesterday in a Docker environment. The purpose is to test the integration with a backend service that connects to MongoDB. It was a very frustrating process especially when done in a local environment … Continue reading
TLDR: Do not put any double quotes or single quotes into the environment parameter in the docker-compose.yml file. Do we really need the long version of the story? Instead of this: Use this instead: Now this is odd as I … Continue reading
As of early June 2019 using the latest version of Expo, I’m not able to use Redux as I’m getting this error memo is not a function when trying to use connect. Spoiler, it is because Expo is using a … Continue reading
I can’t believe that I can’t easily encode and decode Base64 string in React Native without pulling my hair. I’m using Expo to manage my development workflow and it even adds more confusion. Thankfully, a little trick saves me from … Continue reading
When I tried to login to First Metro Securities today, it says that my password already expired and won’t let me log in. I think I went to the classic version and tried to login too but when I changed … Continue reading
My setup is in a Windows 10 machine with VirtualBox installed with a Host Only Network added by VirtualBox. Every time I run expo start it always picks up the VirtualBox network adapter instead of my machine’s Ethernet adapter. Without … Continue reading
In a certain React course in Udemy, I encountered an issue on React and Typescript where an iterator does not work the way it is shown in the course and this is probably because the course is not written in … Continue reading
Hey there, I’m a React and Redux newbie and the annoying issue I’ve encountered is when you connect a component to Redux but the actions are not injected into the component’s props. When you follow the tutorial, it seems straightforward … Continue reading