I do the following for my nodeJS project
$ export NODE_OPTIONS=--max_old_space_size=4096 && npm install $ ng test --watch=false --browsers=ChromeHeadlessN