Component: https://github.com/dowjones/react-dropdown-tree-select/blob/perf-tweaks/src/tree/index.js
Test: https://github.com/dowjones/react-dropdown-tree-select/blob/perf-tweaks/src/tree/index.test.js#L48
Branch with repro: https://github.com/dowjones/react-dropdown-tree-select/tree/perf-tweaks
React has no issues with it. Test pages (yarn demo) works fine on Chrome, Edge browsers with no issues. Only mount fails.
This test started failing after adding react-infinite-scroll-component. However, I'm not sure why. I've checked their source code and nothing stands out of the ordinary. If I take out the component, test runs fine.
mount(<Tree data={treeManager.tree} />) throws Out of Memory error.
FATAL ERROR: CALL_AND_RETRY_LAST Allocation failed - JavaScript heap out of memory
1: node_module_register
2: v8::internal::FatalProcessOutOfMemory
3: v8::internal::FatalProcessOutOfMemory
4: v8::internal::Factory::NewUninitializedFixedArray
5: v8::internal::WasmDebugInfo::SetupForTesting
6: v8::internal::WasmDebugInfo::SetupForTesting
7: v8::internal::WasmDebugInfo::SetupForTesting
8: v8::internal::WasmDebugInfo::SetupForTesting
9: v8::internal::SharedFunctionInfo::SetScript
10: v8::internal::JSReceiver::class_name
11: v8::internal::JSReceiver::class_name
12: v8::internal::JSReceiver::class_name
13: v8::internal::SourcePositionTableIterator::Advance
14: 0000030A229843C1
Should not throw Out of memory error.
node: v8.11.1
npm: 5.6.0
Win 10 x64
```
| library | version
| ---------------- | -------
| Enzyme | ^3.3.0
| React | ^16.0.0
@mrchief can you paste a valid link to the component to repro please.
Hi @sstern6 , I restored the branch and also updated it with latest develop. The linked test still causes out of memory exception, so hopefully, this gives you enough for reproducing. If you skip the test, all tests complete within a few minutes.
Also having this problem
I know this is pretty old, but have there been any developments? Running into the same issue here with Enzyme 3.11.0 and Jest 26.0.1
If I increase the memory to >4GB I get string length errors
Most helpful comment
Hi @sstern6 , I restored the branch and also updated it with latest
develop. The linked test still causes out of memory exception, so hopefully, this gives you enough for reproducing. If youskipthe test, all tests complete within a few minutes.