[NodeJS] Fix test execution for NodeJS v10.9.0 or higher (heap out of memory) #1118
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.




Proposed Changes
Separate tests execution for each module to prevent Allocation Fail Error.
Using Node JS versions higher than 10.8.0 throws an Allocation Fail Error when running the tests due to a bump in the V8 version from 6.7 to 6.8 (introducing a change in heap memory limit).
Because of this, we separated the execution of the tests for each module in different scopes; and doing so, with the command
npm run test, AVA executes the tests from different index files.Testing
lerna clean --yesnpm install.npm run build.npm run test.Evidence
A comparation was made before and after the modifications for NodeJS version 10.9.0 and the last stable version at this moment 11.5.0.
v10.9.0
Before

After

v11.5.0
Before

After
