So this:

happened to me on Travis.
And this is happening locally also when running tests directly from repo:
➜ ckeditor5-engine git:(t/897) ✗ ./node_modules/.bin/ckeditor5-dev-tests --coverage --reporter=dots
<--- Last few GCs --->
31339 ms: Mark-sweep 1409.4 (1404.9) -> 1409.4 (1405.9) MB, 64.8 / 0.0 ms [allocation failure] [GC in old space requested].
31405 ms: Mark-sweep 1409.4 (1405.9) -> 1409.4 (1402.9) MB, 65.8 / 0.0 ms [last resort gc].
31469 ms: Mark-sweep 1409.4 (1402.9) -> 1409.4 (1402.9) MB, 64.2 / 0.0 ms [last resort gc].
<--- JS stacktrace --->
==== JS stack trace =========================================
Security context: 0x241464bcf781 <JS Object>
1: toString [buffer.js:~487] [pc=0x2c5dc942a084] (this=0x1970bd8bd969 <an Uint8Array with map 0xcfeae25f3d9>)
2: /* anonymous */(aka /* anonymous */) [/home/jodator/projects/cksource/ckeditor5/git/ckeditor5-engine/node_modules/karma-webpack/lib/karma-webpack.js:254] [pc=0x2c5dc9729c3f] (this=0x241464b04381 <undefined>,err=0x241464b04381 <undefined>,content=0x1970bd8bd969 <an Uint8Array ...
FATAL ERROR: CALL_AND_RETRY_LAST Allocation failed - JavaScript heap out of memory
1: node::Abort() [node]
2: 0x109f0ac [node]
3: v8::Utils::ReportApiFailure(char const*, char const*) [node]
4: v8::internal::V8::FatalProcessOutOfMemory(char const*, bool) [node]
5: v8::internal::Factory::NewRawTwoByteString(int, v8::internal::PretenureFlag) [node]
6: v8::internal::Factory::NewStringFromUtf8(v8::internal::Vector<char const>, v8::internal::PretenureFlag) [node]
7: v8::String::NewFromUtf8(v8::Isolate*, char const*, v8::String::NewStringType, int) [node]
8: node::StringBytes::Encode(v8::Isolate*, char const*, unsigned long, node::encoding) [node]
9: void node::Buffer::StringSlice<(node::encoding)1>(v8::FunctionCallbackInfo<v8::Value> const&) [node]
10: v8::internal::FunctionCallbackArguments::Call(void (*)(v8::FunctionCallbackInfo<v8::Value> const&)) [node]
11: 0x9ed4ee [node]
12: 0x9edd8e [node]
13: 0x2c5dc76092a7
[1] 11757 abort ./node_modules/.bin/ckeditor5-dev-tests --coverage --reporter=dots
This will fix this:
./node_modules/.bin/ckeditor5-dev-tests --coverage --reporter=dots \
--max_old_space_size=4096
~On the attached screenshot, I can see that eslint exploded. We could consider increasing the memory limit for this tool too.~
This isn't right.
On the attached screenshot, I can see that eslint exploded. We could consider increasing the memory limit for this tool too.
Sorry, but I anticipated that someone will write this and my answer was supposed to be – first please explain why such a small tool as ESLint suddenly requires 1GB of memory ;)
Sure, we can increase stuff, but the first questions you need to ask are "why" and "WTH" ;)
On the attached screenshot, I can see that eslint exploded.
Because it's not ESLint which blew up it's test - or in other words the whole test command:
@pomek OTOH I didn't dig much but is mgit & lerna needed in those tests? I've seen that mgit will do nothing (in single repository run) and lerna propably also is not doing much?
ps.: I didn't dig much :)
Yes, they are. We clone and symlink this pkg's deps.
DUP in https://github.com/ckeditor/ckeditor5-dev/issues/332.
And something to keep in mind:
It turns out that adding
--max_old_space_size=4096only inpackage.jsonworks only when doingnpm run *from that specific package. In other cases, packages' scripts are installed via copy&paste so this information is lost. So it needs to be used directly in the executable one's calling.
OK, let's see what's going to happen now.
It's Friday time!
+ "ckeditor5-dev-tests-travis": "node --max_old_space_size=4096 ./bin/test-travis.sh",
Next release in a couple of minutes.
OK, it's definitely not this way:

This is pretty interesting:
(master 5bbf541) p@m /workspace/test/ckeditor5-engine> npm i @ckeditor/ckeditor5-dev-tests
@ckeditor/[email protected] /workspace/test/ckeditor5-engine
├── [email protected] extraneous
└── [email protected] extraneous
npm ERR! path /workspace/test/ckeditor5-engine/node_modules/@ckeditor/ckeditor5-dev-tests/node --max_old_space_size=4096 ./bin/test.js
npm ERR! code ENOENT
npm ERR! errno -2
npm ERR! syscall chmod
npm ERR! enoent ENOENT: no such file or directory, chmod '/workspace/test/ckeditor5-engine/node_modules/@ckeditor/ckeditor5-dev-tests/node --max_old_space_size=4096 ./bin/test.js'
npm ERR! enoent This is most likely not a problem with npm itself
npm ERR! enoent and is related to npm not being able to find a file.
npm ERR! enoent
It made me realise that ckeditor5-dev-tests exposes bin not scripts. For some reason I've never realised that these are separate package.json fields :D
Let's hope that https://github.com/ckeditor/ckeditor5-dev/commit/ee8fdc51e7325d9f812cb4bf89036c3f3bc43579 fixes it.
Most helpful comment
Yes, they are. We clone and symlink this pkg's deps.