We run tests in separate processes, and several of our test suites contain more than 20 files. How can we limit (but not increase) the memory capacity of a Node.js using less than 300 megabytes? If we do not limit memory, we can use up to 20x500 MB, which is about 10 GB, which is too much memory.
I can find several articles on the Internet about memory expansion, but I can not find anything in the memory limit for each process.
In particular, we use the main module child_process to create child processes, and, I think, we need some flag or arg to pass to cp in order to assign a memory cap.
source
share