Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

-i has memory issue? #5157

Closed
OverseePublic opened this issue Dec 21, 2017 · 13 comments · Fixed by #5279
Closed

-i has memory issue? #5157

OverseePublic opened this issue Dec 21, 2017 · 13 comments · Fixed by #5279

Comments

@OverseePublic
Copy link

Reproducing project can be found:

https://github.com/OverseePublic/jest-memory-test

Without the -i
image

With the -i
image

Is this a memory bug or expected behavior?

@OverseePublic
Copy link
Author

Also happens in the same repository in enzyme branch
image

@hudochenkov
Copy link

We have the same problem in stylelint/stylelint#3069

Tests finished:

Jest 22.0.4: $ npm run jest -- --logHeapUsage
$ npm run jest -- --logHeapUsage

> stylelint@8.4.0 jest /Users/aleks/projects/stylelint
> jest "--logHeapUsage"

 PASS  lib/rules/no-missing-end-of-source-newline/__tests__/index.js (51 MB heap size)
 PASS  lib/rules/font-family-no-duplicate-names/__tests__/index.js (50 MB heap size)
 PASS  lib/rules/no-invalid-double-slash-comments/__tests__/index.js (47 MB heap size)
 PASS  lib/rules/declaration-property-unit-whitelist/__tests__/index.js (43 MB heap size)
 PASS  lib/rules/unit-whitelist/__tests__/index.js (54 MB heap size)
 PASS  lib/rules/font-family-name-quotes/__tests__/index.js (53 MB heap size)
 PASS  lib/rules/no-extra-semicolons/__tests__/index.js (61 MB heap size)
 PASS  lib/rules/number-max-precision/__tests__/index.js (64 MB heap size)
 PASS  lib/rules/property-blacklist/__tests__/index.js (59 MB heap size)
 PASS  lib/rules/no-eol-whitespace/__tests__/index.js (56 MB heap size)
 PASS  lib/rules/number-no-trailing-zeros/__tests__/index.js (65 MB heap size)
 PASS  lib/rules/property-no-unknown/__tests__/index.js (63 MB heap size)
 PASS  lib/rules/no-empty-source/__tests__/index.js (66 MB heap size)
 PASS  lib/rules/property-case/__tests__/index.js (65 MB heap size)
 PASS  lib/rules/property-no-vendor-prefix/__tests__/index.js (70 MB heap size)
 PASS  lib/rules/no-duplicate-selectors/__tests__/index.js (80 MB heap size)
 PASS  lib/rules/property-whitelist/__tests__/index.js (79 MB heap size)
 PASS  lib/rules/no-duplicate-at-import-rules/__tests__/index.js (71 MB heap size)
 PASS  lib/rules/no-descending-specificity/__tests__/index.js (75 MB heap size)
 PASS  lib/rules/selector-attribute-operator-blacklist/__tests__/index.js (86 MB heap size)
 PASS  lib/rules/media-query-list-comma-space-before/__tests__/index.js (85 MB heap size)
 PASS  lib/rules/selector-attribute-brackets-space-inside/__tests__/index.js (88 MB heap size)
 PASS  lib/rules/media-query-list-comma-space-after/__tests__/index.js (79 MB heap size)
 PASS  lib/rules/rule-empty-line-before/__tests__/index.js (90 MB heap size)
 PASS  lib/rules/media-query-list-comma-newline-before/__tests__/index.js (93 MB heap size)
 PASS  lib/rules/media-query-list-comma-newline-after/__tests__/index.js (103 MB heap size)
 PASS  lib/rules/selector-attribute-operator-whitelist/__tests__/index.js (83 MB heap size)
 PASS  lib/rules/media-feature-range-operator-space-before/__tests__/index.js (100 MB heap size)
 PASS  lib/rules/selector-attribute-operator-space-after/__tests__/index.js (96 MB heap size)
 PASS  lib/rules/media-feature-range-operator-space-after/__tests__/index.js (97 MB heap size)
 PASS  lib/rules/selector-attribute-quotes/__tests__/index.js (84 MB heap size)
 PASS  lib/rules/media-feature-parentheses-space-inside/__tests__/index.js (98 MB heap size)
 PASS  lib/rules/media-feature-name-whitelist/__tests__/index.js (116 MB heap size)
 PASS  lib/rules/media-feature-name-no-vendor-prefix/__tests__/index.js (98 MB heap size)
 PASS  lib/rules/selector-attribute-operator-space-before/__tests__/index.js (107 MB heap size)
 PASS  lib/rules/selector-class-pattern/__tests__/index.js (119 MB heap size)
 PASS  lib/rules/selector-combinator-space-after/__tests__/index.js (118 MB heap size)
 PASS  lib/rules/selector-combinator-space-before/__tests__/index.js (115 MB heap size)
 PASS  lib/rules/selector-descendant-combinator-no-non-space/__tests__/index.js (115 MB heap size)
 PASS  lib/rules/selector-id-pattern/__tests__/index.js (120 MB heap size)
 PASS  lib/rules/media-feature-name-blacklist/__tests__/index.js (128 MB heap size)
 PASS  lib/rules/media-feature-name-case/__tests__/index.js (128 MB heap size)
 PASS  lib/rules/media-feature-name-no-unknown/__tests__/index.js (131 MB heap size)
 PASS  lib/rules/selector-list-comma-newline-before/__tests__/index.js (130 MB heap size)
 PASS  lib/rules/selector-list-comma-newline-after/__tests__/index.js (110 MB heap size)
 PASS  lib/rules/media-feature-colon-space-before/__tests__/index.js (127 MB heap size)
 PASS  lib/rules/max-nesting-depth/__tests__/index.js (113 MB heap size)
 PASS  lib/rules/media-feature-colon-space-after/__tests__/index.js (151 MB heap size)
 PASS  lib/rules/selector-list-comma-space-after/__tests__/index.js (139 MB heap size)
 PASS  lib/rules/max-line-length/__tests__/index.js (131 MB heap size)
 PASS  lib/rules/selector-list-comma-space-before/__tests__/index.js (146 MB heap size)
 PASS  lib/rules/selector-max-attribute/__tests__/index.js (150 MB heap size)
 PASS  lib/rules/selector-max-class/__tests__/index.js (124 MB heap size)
 PASS  lib/rules/max-empty-lines/__tests__/index.js (128 MB heap size)
 PASS  lib/rules/selector-max-combinators/__tests__/index.js (138 MB heap size)
 PASS  lib/rules/keyframe-declaration-no-important/__tests__/index.js (131 MB heap size)
 PASS  lib/rules/length-zero-no-unit/__tests__/index.js (124 MB heap size)
 PASS  lib/rules/selector-max-compound-selectors/__tests__/index.js (152 MB heap size)
 PASS  lib/rules/indentation/__tests__/selectors.js (135 MB heap size)
 PASS  lib/rules/selector-max-id/__tests__/index.js (145 MB heap size)
 PASS  lib/rules/indentation/__tests__/html.js (138 MB heap size)
 PASS  lib/rules/selector-max-specificity/__tests__/index.js (138 MB heap size)
 PASS  lib/rules/indentation/__tests__/rules.js (163 MB heap size)
 PASS  lib/rules/selector-max-universal/__tests__/index.js (158 MB heap size)
 PASS  lib/rules/indentation/__tests__/comments.js (157 MB heap size)
 PASS  lib/rules/selector-max-type/__tests__/index.js (161 MB heap size)
 PASS  lib/rules/indentation/__tests__/functions.js (163 MB heap size)
 PASS  lib/rules/selector-max-empty-lines/__tests__/index.js (173 MB heap size)
 PASS  lib/rules/selector-nested-pattern/__tests__/index.js (157 MB heap size)
 PASS  lib/rules/selector-no-vendor-prefix/__tests__/index.js (131 MB heap size)
 PASS  lib/rules/indentation/__tests__/at-rules.js (180 MB heap size)
 PASS  lib/rules/function-whitespace-after/__tests__/index.js (171 MB heap size)
 PASS  lib/rules/function-whitelist/__tests__/index.js (171 MB heap size)
 PASS  lib/rules/selector-pseudo-class-blacklist/__tests__/index.js (193 MB heap size)
 PASS  lib/rules/function-url-scheme-whitelist/__tests__/index.js (179 MB heap size)
 PASS  lib/rules/function-url-scheme-blacklist/__tests__/index.js (186 MB heap size)
 PASS  lib/rules/selector-pseudo-class-case/__tests__/index.js (162 MB heap size)
 PASS  lib/rules/selector-pseudo-class-no-unknown/__tests__/index.js (188 MB heap size)
 PASS  lib/rules/function-url-quotes/__tests__/index.js (190 MB heap size)
 PASS  lib/rules/selector-pseudo-class-parentheses-space-inside/__tests__/index.js (213 MB heap size)
 PASS  lib/rules/function-url-no-scheme-relative/__tests__/index.js (187 MB heap size)
 PASS  lib/rules/selector-pseudo-class-whitelist/__tests__/index.js (204 MB heap size)
 PASS  lib/rules/function-parentheses-space-inside/__tests__/index.js (177 MB heap size)
 PASS  lib/rules/selector-no-qualifying-type/__tests__/index.js (154 MB heap size)
 PASS  lib/rules/selector-pseudo-element-case/__tests__/index.js (161 MB heap size)
 PASS  lib/rules/selector-pseudo-element-colon-notation/__tests__/index.js (143 MB heap size)
 PASS  lib/rules/function-parentheses-newline-inside/__tests__/index.js (157 MB heap size)
 PASS  lib/rules/selector-pseudo-element-no-unknown/__tests__/index.js (177 MB heap size)
 PASS  lib/rules/function-name-case/__tests__/index.js (154 MB heap size)
 PASS  lib/rules/selector-type-case/__tests__/index.js (172 MB heap size)
 PASS  lib/rules/function-max-empty-lines/__tests__/index.js (193 MB heap size)
 PASS  lib/rules/function-linear-gradient-no-nonstandard-direction/__tests__/index.js (180 MB heap size)
 PASS  lib/rules/selector-type-no-unknown/__tests__/index.js (159 MB heap size)
 PASS  lib/rules/function-comma-space-before/__tests__/index.js (172 MB heap size)
 PASS  lib/rules/string-no-newline/__tests__/index.js (185 MB heap size)
 PASS  lib/rules/function-comma-space-after/__tests__/index.js (171 MB heap size)
 PASS  lib/rules/shorthand-property-no-redundant-values/__tests__/index.js (196 MB heap size)
 PASS  lib/rules/string-quotes/__tests__/index.js (191 MB heap size)
 PASS  lib/rules/time-min-milliseconds/__tests__/index.js (193 MB heap size)
 PASS  lib/rules/function-comma-newline-after/__tests__/index.js (173 MB heap size)
 PASS  lib/rules/function-comma-newline-before/__tests__/index.js (213 MB heap size)
 PASS  lib/rules/function-calc-no-unspaced-operator/__tests__/index.js (203 MB heap size)
 PASS  lib/rules/function-blacklist/__tests__/index.js (208 MB heap size)
 PASS  lib/rules/unit-blacklist/__tests__/index.js (195 MB heap size)
 PASS  lib/rules/font-weight-notation/__tests__/index.js (216 MB heap size)
 PASS  lib/rules/unit-no-unknown/__tests__/index.js (197 MB heap size)
 PASS  lib/rules/font-family-no-missing-generic-family-keyword/__tests__/index.js (159 MB heap size)
 PASS  lib/rules/unit-case/__tests__/index.js (214 MB heap size)
 PASS  lib/rules/declaration-property-value-whitelist/__tests__/index.js (217 MB heap size)
 PASS  lib/rules/declaration-property-value-blacklist/__tests__/index.js (223 MB heap size)
 PASS  lib/__tests__/createLinter.test.js (208 MB heap size)
 PASS  lib/rules/number-leading-zero/__tests__/index.js (229 MB heap size)
 PASS  lib/rules/value-list-comma-newline-after/__tests__/index.js (183 MB heap size)
 PASS  lib/rules/value-list-comma-newline-before/__tests__/index.js (227 MB heap size)
 PASS  lib/rules/declaration-property-unit-blacklist/__tests__/index.js (227 MB heap size)
 PASS  lib/rules/declaration-no-important/__tests__/index.js (221 MB heap size)
 PASS  lib/rules/value-list-comma-space-after/__tests__/index.js (243 MB heap size)
 PASS  lib/rules/value-list-comma-space-before/__tests__/index.js (247 MB heap size)
 PASS  lib/rules/value-list-max-empty-lines/__tests__/index.js (250 MB heap size)
 PASS  lib/rules/value-keyword-case/__tests__/index.js (221 MB heap size)
 PASS  lib/testUtils/__tests__/createRuleTester.test.js (258 MB heap size)
 PASS  lib/rules/declaration-colon-space-before/__tests__/index.js (247 MB heap size)
 PASS  lib/testUtils/__tests__/mergeTestDescriptions.test.js (243 MB heap size)
 PASS  lib/rules/value-no-vendor-prefix/__tests__/index.js (167 MB heap size)
 PASS  lib/rules/declaration-empty-line-before/__tests__/index.js (211 MB heap size)
 PASS  lib/rules/declaration-colon-space-after/__tests__/index.js (257 MB heap size)
 PASS  lib/rules/declaration-colon-newline-after/__tests__/index.js (258 MB heap size)
 PASS  lib/rules/declaration-block-trailing-semicolon/__tests__/index.js (266 MB heap size)
 PASS  lib/utils/__tests__/addEmptyLineBefore.test.js (205 MB heap size)
 PASS  lib/utils/__tests__/atRuleParamIndex.test.js (177 MB heap size)
 PASS  lib/utils/__tests__/beforeBlockString.test.js (197 MB heap size)
 PASS  lib/rules/declaration-block-semicolon-space-before/__tests__/index.js (218 MB heap size)
 PASS  lib/utils/__tests__/blockString.test.js (288 MB heap size)
 PASS  lib/rules/declaration-block-single-line-max-declarations/__tests__/index.js (193 MB heap size)
 PASS  lib/utils/__tests__/blurComments.test.js (187 MB heap size)
 PASS  lib/rules/declaration-block-semicolon-space-after/__tests__/index.js (202 MB heap size)
 PASS  lib/rules/declaration-block-semicolon-newline-before/__tests__/index.js (222 MB heap size)
 PASS  lib/utils/__tests__/blurFunctionArguments.test.js (240 MB heap size)
 PASS  lib/rules/declaration-block-semicolon-newline-after/__tests__/index.js (207 MB heap size)
 PASS  lib/utils/__tests__/blurInterpolation.test.js (203 MB heap size)
 PASS  lib/utils/__tests__/checkAgainstRule.test.js (213 MB heap size)
 PASS  lib/rules/declaration-block-no-redundant-longhand-properties/__tests__/index.js (206 MB heap size)
 PASS  lib/rules/declaration-block-no-duplicate-properties/__tests__/index.js (236 MB heap size)
 PASS  lib/utils/__tests__/containsString.test.js (249 MB heap size)
 PASS  lib/rules/declaration-block-no-shorthand-property-overrides/__tests__/index.js (204 MB heap size)
 PASS  lib/utils/__tests__/declarationValueIndex.test.js (225 MB heap size)
 PASS  lib/rules/declaration-bang-space-before/__tests__/index.js (225 MB heap size)
 PASS  lib/utils/__tests__/findAnimationName.test.js (216 MB heap size)
 PASS  lib/rules/declaration-bang-space-after/__tests__/index.js (219 MB heap size)
 PASS  lib/utils/__tests__/findAtRuleContext.test.js (259 MB heap size)
 PASS  lib/rules/custom-property-pattern/__tests__/index.js (253 MB heap size)
 PASS  lib/utils/__tests__/findFontFamily.test.js (236 MB heap size)
 PASS  lib/rules/custom-media-pattern/__tests__/index.js (245 MB heap size)
 PASS  lib/utils/__tests__/findListStyleType.test.js (227 MB heap size)
 PASS  lib/rules/comment-word-blacklist/__tests__/index.js (243 MB heap size)
 PASS  lib/utils/__tests__/getNextNonSharedLineCommentNode.test.js (246 MB heap size)
 PASS  lib/rules/comment-whitespace-inside/__tests__/index.js (270 MB heap size)
 PASS  lib/utils/__tests__/getPreviousNonSharedLineCommentNode.test.js (249 MB heap size)
 PASS  lib/rules/custom-property-empty-line-before/__tests__/index.js (237 MB heap size)
 PASS  lib/rules/comment-no-empty/__tests__/index.js (249 MB heap size)
 PASS  lib/utils/__tests__/functionArgumentsSearch.test.js (198 MB heap size)
 PASS  lib/utils/__tests__/getSchemeFromUrl.test.js (256 MB heap size)
 PASS  lib/utils/__tests__/getUnitFromValueNode.test.js (259 MB heap size)
 PASS  lib/utils/__tests__/hasBlock.test.js (273 MB heap size)
 PASS  lib/rules/color-no-invalid-hex/__tests__/index.js (274 MB heap size)
 PASS  lib/rules/color-no-hex/__tests__/index.js (241 MB heap size)
 PASS  lib/rules/comment-empty-line-before/__tests__/index.js (265 MB heap size)
 PASS  lib/utils/__tests__/hasEmptyBlock.test.js (266 MB heap size)
 PASS  lib/utils/__tests__/hasEmptyLine.test.js (283 MB heap size)
 PASS  lib/utils/__tests__/hasInterpolation.test.js (263 MB heap size)
 PASS  lib/rules/color-named/__tests__/index.js (215 MB heap size)
 PASS  lib/rules/color-hex-case/__tests__/index.js (293 MB heap size)
 PASS  lib/utils/__tests__/isAfterComment.test.js (288 MB heap size)
 PASS  lib/rules/block-opening-brace-space-before/__tests__/index.js (282 MB heap size)
 PASS  lib/utils/__tests__/isAfterSingleLineComment.test.js (273 MB heap size)
 PASS  lib/rules/color-hex-length/__tests__/index.js (269 MB heap size)
 PASS  lib/utils/__tests__/isBlocklessAtRuleAfterBlocklessAtRule.test.js (315 MB heap size)
 PASS  lib/rules/block-opening-brace-space-after/__tests__/index.js (303 MB heap size)
 PASS  lib/rules/block-opening-brace-newline-before/__tests__/index.js (239 MB heap size)
 PASS  lib/utils/__tests__/isBlocklessAtRuleAfterSameNameBlocklessAtRule.test.js (292 MB heap size)
 PASS  lib/rules/block-no-empty/__tests__/index.js (290 MB heap size)
 PASS  lib/utils/__tests__/isCounterIncrementCustomIdentValue.test.js (226 MB heap size)
 PASS  lib/rules/block-opening-brace-newline-after/__tests__/index.js (301 MB heap size)
 PASS  lib/utils/__tests__/isCounterResetCustomIdentValue.test.js (313 MB heap size)
 PASS  lib/utils/__tests__/isCustomElement.test.js (315 MB heap size)
 PASS  lib/rules/block-closing-brace-space-before/__tests__/index.js (323 MB heap size)
 PASS  lib/utils/__tests__/isCustomMediaQuery.test.js (236 MB heap size)
 PASS  lib/utils/__tests__/isCustomProperty.test.js (322 MB heap size)
 PASS  lib/rules/block-closing-brace-newline-before/__tests__/index.js (304 MB heap size)
 PASS  lib/rules/block-closing-brace-space-after/__tests__/index.js (258 MB heap size)
 PASS  lib/utils/__tests__/isCustomPropertySet.test.js (345 MB heap size)
 PASS  lib/rules/at-rule-whitelist/__tests__/index.js (253 MB heap size)
 PASS  lib/utils/__tests__/isFirstNested.test.js (269 MB heap size)
 PASS  lib/rules/block-closing-brace-newline-after/__tests__/index.js (319 MB heap size)
 PASS  lib/rules/at-rule-semicolon-space-before/__tests__/index.js (314 MB heap size)
 PASS  lib/utils/__tests__/isKeyframeRule.test.js (263 MB heap size)
 PASS  lib/rules/block-closing-brace-empty-line-before/__tests__/index.js (329 MB heap size)
 PASS  lib/utils/__tests__/isCustomSelector.test.js (252 MB heap size)
 PASS  lib/rules/at-rule-no-vendor-prefix/__tests__/index.js (282 MB heap size)
 PASS  lib/utils/__tests__/isKeyframeSelector.test.js (252 MB heap size)
 PASS  lib/rules/at-rule-semicolon-newline-after/__tests__/index.js (275 MB heap size)
 PASS  lib/utils/__tests__/isNumbery.test.js (273 MB heap size)
 PASS  lib/utils/__tests__/isOnlyWhitespace.test.js (261 MB heap size)
 PASS  lib/utils/__tests__/isRangeContextMediaFeature.test.js (262 MB heap size)
 PASS  lib/rules/at-rule-name-space-after/__tests__/index.js (249 MB heap size)
 PASS  lib/rules/at-rule-no-unknown/__tests__/index.js (335 MB heap size)
 PASS  lib/utils/__tests__/isSharedLineComment.test.js (296 MB heap size)
 PASS  lib/rules/at-rule-name-newline-after/__tests__/index.js (302 MB heap size)
 PASS  lib/rules/at-rule-name-case/__tests__/index.js (292 MB heap size)
 PASS  lib/utils/__tests__/isSingleLineString.test.js (271 MB heap size)
 PASS  lib/rules/at-rule-blacklist/__tests__/index.js (268 MB heap size)
 PASS  lib/utils/__tests__/isStandardSyntaxAtRule.test.js (254 MB heap size)
 PASS  lib/utils/__tests__/isStandardSyntaxDeclaration.test.js (313 MB heap size)
 PASS  lib/formatters/__tests__/verboseFormatter.test.js (300 MB heap size)
 PASS  lib/utils/__tests__/isStandardSyntaxFunction.test.js (294 MB heap size)
 PASS  lib/formatters/__tests__/stringFormatter.test.js (309 MB heap size)
 PASS  lib/utils/__tests__/isStandardSyntaxMediaFeature.test.js (264 MB heap size)
 PASS  lib/formatters/__tests__/needlessDisablesStringFormatter.test.js (284 MB heap size)
 PASS  lib/formatters/__tests__/jsonFormatter.test.js (323 MB heap size)
 PASS  lib/utils/__tests__/isStandardSyntaxMediaFeatureName.test.js (311 MB heap size)
 PASS  lib/__tests__/stylelintignore-test/stylelintignore.test.js (306 MB heap size)
 PASS  lib/utils/__tests__/isStandardSyntaxProperty.test.js (318 MB heap size)
 PASS  lib/utils/__tests__/isStandardSyntaxRule.test.js (295 MB heap size)
 PASS  lib/utils/__tests__/isStandardSyntaxSelector.test.js (335 MB heap size)
 PASS  lib/__tests__/standalone.test.js (277 MB heap size)
 PASS  lib/__tests__/standalone-quiet.test.js (316 MB heap size)
 PASS  lib/utils/__tests__/isStandardSyntaxTypeSelector.test.js (329 MB heap size)
 PASS  lib/__tests__/standalone-parseErrors.test.js (305 MB heap size)
 PASS  lib/utils/__tests__/isStandardSyntaxUrl.test.js (348 MB heap size)
 PASS  lib/rules/at-rule-empty-line-before/__tests__/index.js (310 MB heap size)
 PASS  lib/__tests__/standalone-needlessDisables.test.js (289 MB heap size)
 PASS  lib/__tests__/standalone-syntax.test.js (244 MB heap size)
 PASS  lib/utils/__tests__/isStandardSyntaxValue.test.js (326 MB heap size)
 PASS  lib/__tests__/standalone-formatter.test.js (352 MB heap size)
 PASS  lib/utils/__tests__/isValidFontSize.test.js (315 MB heap size)
 PASS  lib/__tests__/standalone-deprecations.test.js (358 MB heap size)
 PASS  lib/utils/__tests__/isValidHex.test.js (319 MB heap size)
 PASS  lib/utils/__tests__/isVariable.test.js (253 MB heap size)
 PASS  lib/__tests__/standalone-cache.test.js (304 MB heap size)
 PASS  lib/utils/__tests__/matchesStringOrRegExp.test.js (363 MB heap size)
 PASS  lib/__tests__/processors.test.js (340 MB heap size)
 PASS  lib/__tests__/postcssPlugin.test.js (326 MB heap size)
 PASS  lib/utils/__tests__/nextNonCommentNode.test.js (367 MB heap size)
 PASS  lib/__tests__/plugins.test.js (334 MB heap size)
 PASS  lib/utils/__tests__/nodeContextLookup.test.js (264 MB heap size)
 PASS  lib/__tests__/normalizeRuleSettings.test.js (315 MB heap size)
 PASS  lib/utils/__tests__/optionsMatches.test.js (373 MB heap size)
 PASS  lib/__tests__/normalizeRuleSettings-integration.test.js (352 MB heap size)
 PASS  lib/utils/__tests__/removeEmptyLineBefore.test.js (349 MB heap size)
 PASS  lib/__tests__/message.test.js (287 MB heap size)
 PASS  lib/utils/__tests__/report.test.js (345 MB heap size)
 PASS  lib/utils/__tests__/ruleMessages.test.js (337 MB heap size)
 PASS  lib/utils/__tests__/validateObjectWithStringArrayProps.test.js (362 MB heap size)
 PASS  lib/__tests__/integration.test.js (387 MB heap size)
 PASS  lib/__tests__/ignoreDisables.test.js (361 MB heap size)
 PASS  lib/__tests__/needlessDisables.test.js (286 MB heap size)
 PASS  lib/utils/__tests__/validateOptions.test.js (300 MB heap size)
 PASS  lib/__tests__/formatters.test.js (385 MB heap size)
 PASS  lib/__tests__/ignore.test.js (360 MB heap size)
 PASS  system-tests/002/002.test.js (401 MB heap size)
 PASS  lib/__tests__/extends.test.js (373 MB heap size)
 PASS  lib/__tests__/disableRanges.test.js (312 MB heap size)
 PASS  system-tests/003/003.test.js (309 MB heap size)
 PASS  lib/__tests__/disableRanges-integration.test.js (383 MB heap size)
 PASS  lib/__tests__/defaultSeverity.test.js (382 MB heap size)
 PASS  system-tests/fix/fix.test.js (327 MB heap size)
 PASS  lib/rules/no-unknown-animations/__tests__/index.js (321 MB heap size)
 PASS  system-tests/005/005.test.js (432 MB heap size)
 PASS  system-tests/004/004.test.js (394 MB heap size)
 PASS  system-tests/001/001.test.js (359 MB heap size)

Test Suites: 270 passed, 270 total
Tests:       13254 passed, 13254 total
Snapshots:   6 passed, 6 total
Time:        26.179s
Ran all test suites.

Tests failed due out of memory situation:

Jest 22.0.4: $ npm run jest -- --runInBand --logHeapUsage
$ npm run jest -- --runInBand --logHeapUsage

> stylelint@8.4.0 jest /Users/aleks/projects/stylelint
> jest "--runInBand" "--logHeapUsage"

 PASS  lib/rules/at-rule-empty-line-before/__tests__/index.js (76 MB heap size)
 PASS  system-tests/001/001.test.js (82 MB heap size)
 PASS  lib/rules/selector-no-qualifying-type/__tests__/index.js (118 MB heap size)
 PASS  lib/rules/selector-max-empty-lines/__tests__/index.js (137 MB heap size)
 PASS  system-tests/004/004.test.js (144 MB heap size)
 PASS  lib/rules/value-keyword-case/__tests__/index.js (142 MB heap size)
 PASS  lib/rules/selector-attribute-operator-space-before/__tests__/index.js (175 MB heap size)
 PASS  lib/rules/selector-attribute-operator-space-after/__tests__/index.js (208 MB heap size)
 PASS  lib/rules/declaration-empty-line-before/__tests__/index.js (232 MB heap size)
 PASS  lib/rules/rule-empty-line-before/__tests__/index.js (263 MB heap size)
 PASS  lib/rules/custom-property-empty-line-before/__tests__/index.js (231 MB heap size)
 PASS  system-tests/005/005.test.js (253 MB heap size)
 PASS  lib/__tests__/needlessDisables.test.js (266 MB heap size)
 PASS  lib/rules/color-named/__tests__/index.js (283 MB heap size)
 PASS  lib/rules/no-extra-semicolons/__tests__/index.js (309 MB heap size)
 PASS  lib/rules/selector-attribute-brackets-space-inside/__tests__/index.js (332 MB heap size)
 PASS  lib/rules/indentation/__tests__/rules.js (353 MB heap size)
 PASS  lib/rules/property-case/__tests__/index.js (366 MB heap size)
 PASS  lib/rules/function-url-quotes/__tests__/index.js (332 MB heap size)
 PASS  lib/rules/selector-pseudo-class-case/__tests__/index.js (348 MB heap size)
 PASS  lib/rules/font-family-name-quotes/__tests__/index.js (368 MB heap size)
 PASS  lib/rules/comment-empty-line-before/__tests__/index.js (389 MB heap size)
 PASS  lib/rules/media-query-list-comma-space-after/__tests__/index.js (413 MB heap size)
 PASS  lib/rules/unit-case/__tests__/index.js (426 MB heap size)
 PASS  lib/rules/block-closing-brace-newline-after/__tests__/index.js (454 MB heap size)
 PASS  lib/rules/indentation/__tests__/functions.js (470 MB heap size)
 PASS  lib/rules/unit-whitelist/__tests__/index.js (491 MB heap size)
 PASS  lib/rules/shorthand-property-no-redundant-values/__tests__/index.js (508 MB heap size)
 PASS  lib/rules/block-closing-brace-space-after/__tests__/index.js (523 MB heap size)
 PASS  lib/rules/selector-pseudo-element-case/__tests__/index.js (549 MB heap size)
 PASS  lib/rules/max-line-length/__tests__/index.js (483 MB heap size)
 PASS  lib/rules/block-opening-brace-space-before/__tests__/index.js (511 MB heap size)
 PASS  lib/rules/function-parentheses-space-inside/__tests__/index.js (525 MB heap size)
 PASS  lib/rules/block-opening-brace-newline-before/__tests__/index.js (551 MB heap size)
 PASS  lib/rules/at-rule-name-space-after/__tests__/index.js (564 MB heap size)
 PASS  lib/rules/unit-no-unknown/__tests__/index.js (588 MB heap size)
 PASS  lib/rules/unit-blacklist/__tests__/index.js (600 MB heap size)
 PASS  lib/rules/selector-max-specificity/__tests__/index.js (618 MB heap size)
 PASS  lib/rules/length-zero-no-unit/__tests__/index.js (642 MB heap size)
 PASS  lib/__tests__/ignore.test.js (655 MB heap size)
 PASS  lib/rules/selector-combinator-space-after/__tests__/index.js (671 MB heap size)
 PASS  lib/rules/number-leading-zero/__tests__/index.js (693 MB heap size)
 PASS  system-tests/002/002.test.js (704 MB heap size)
 PASS  lib/rules/indentation/__tests__/at-rules.js (722 MB heap size)
 PASS  lib/rules/selector-max-type/__tests__/index.js (742 MB heap size)
 PASS  lib/rules/function-name-case/__tests__/index.js (766 MB heap size)
 PASS  lib/rules/at-rule-name-newline-after/__tests__/index.js (786 MB heap size)
 PASS  lib/rules/block-closing-brace-space-before/__tests__/index.js (806 MB heap size)
 PASS  lib/rules/media-feature-name-case/__tests__/index.js (815 MB heap size)
 PASS  lib/rules/selector-combinator-space-before/__tests__/index.js (738 MB heap size)
 PASS  lib/rules/block-opening-brace-space-after/__tests__/index.js (758 MB heap size)
 PASS  lib/rules/selector-class-pattern/__tests__/index.js (772 MB heap size)
 PASS  lib/rules/at-rule-name-case/__tests__/index.js (789 MB heap size)
 PASS  lib/rules/function-calc-no-unspaced-operator/__tests__/index.js (807 MB heap size)
 PASS  lib/__tests__/standalone.test.js (817 MB heap size)
 PASS  lib/rules/function-max-empty-lines/__tests__/index.js (843 MB heap size)
 PASS  lib/rules/function-comma-space-after/__tests__/index.js (859 MB heap size)
 PASS  lib/rules/function-comma-space-before/__tests__/index.js (875 MB heap size)
 PASS  lib/rules/declaration-property-unit-whitelist/__tests__/index.js (886 MB heap size)
 PASS  lib/rules/block-closing-brace-newline-before/__tests__/index.js (911 MB heap size)
 PASS  lib/rules/selector-type-no-unknown/__tests__/index.js (928 MB heap size)
 PASS  lib/rules/function-comma-newline-after/__tests__/index.js (942 MB heap size)
 PASS  lib/rules/selector-nested-pattern/__tests__/index.js (956 MB heap size)
 PASS  lib/rules/selector-list-comma-newline-after/__tests__/index.js (979 MB heap size)
 PASS  lib/rules/selector-max-compound-selectors/__tests__/index.js (990 MB heap size)
 PASS  lib/rules/font-weight-notation/__tests__/index.js (1014 MB heap size)
 PASS  lib/rules/function-url-scheme-whitelist/__tests__/index.js (1026 MB heap size)
 PASS  lib/rules/string-quotes/__tests__/index.js (1049 MB heap size)
 PASS  lib/rules/block-closing-brace-empty-line-before/__tests__/index.js (1063 MB heap size)
 PASS  lib/rules/color-hex-length/__tests__/index.js (984 MB heap size)
 PASS  lib/rules/block-opening-brace-newline-after/__tests__/index.js (1009 MB heap size)
 PASS  lib/rules/no-invalid-double-slash-comments/__tests__/index.js (1024 MB heap size)
 PASS  lib/__tests__/standalone-syntax.test.js (1034 MB heap size)
 PASS  lib/rules/no-missing-end-of-source-newline/__tests__/index.js (1051 MB heap size)
 PASS  lib/rules/function-comma-newline-before/__tests__/index.js (1061 MB heap size)
 PASS  lib/rules/font-family-no-duplicate-names/__tests__/index.js (1079 MB heap size)
 PASS  lib/rules/media-query-list-comma-space-before/__tests__/index.js (1092 MB heap size)
 PASS  lib/rules/declaration-block-semicolon-newline-after/__tests__/index.js (1114 MB heap size)
 PASS  lib/rules/selector-pseudo-class-parentheses-space-inside/__tests__/index.js (1134 MB heap size)
 PASS  lib/rules/no-eol-whitespace/__tests__/index.js (1141 MB heap size)
 PASS  lib/rules/selector-attribute-quotes/__tests__/index.js (1159 MB heap size)
 PASS  lib/rules/selector-list-comma-space-before/__tests__/index.js (1178 MB heap size)
 PASS  lib/rules/selector-type-case/__tests__/index.js (1141 MB heap size)
 PASS  system-tests/003/003.test.js (1164 MB heap size)
 PASS  lib/rules/function-parentheses-newline-inside/__tests__/index.js (1173 MB heap size)
 PASS  lib/rules/color-hex-case/__tests__/index.js (1192 MB heap size)
 PASS  lib/rules/comment-word-blacklist/__tests__/index.js (1215 MB heap size)
 PASS  lib/rules/number-no-trailing-zeros/__tests__/index.js (1231 MB heap size)
 PASS  lib/rules/selector-max-attribute/__tests__/index.js (1238 MB heap size)
 PASS  lib/rules/media-query-list-comma-newline-before/__tests__/index.js (1256 MB heap size)
 PASS  lib/rules/selector-max-id/__tests__/index.js (1248 MB heap size)
 PASS  lib/rules/property-no-unknown/__tests__/index.js (1261 MB heap size)
 PASS  lib/rules/declaration-block-semicolon-space-before/__tests__/index.js (1270 MB heap size)
 PASS  lib/rules/time-min-milliseconds/__tests__/index.js (1291 MB heap size)
 PASS  lib/rules/function-linear-gradient-no-nonstandard-direction/__tests__/index.js (1287 MB heap size)
 PASS  lib/rules/value-list-comma-space-before/__tests__/index.js (1299 MB heap size)
 PASS  lib/rules/function-url-scheme-blacklist/__tests__/index.js (1311 MB heap size)
 PASS  lib/rules/value-list-comma-newline-before/__tests__/index.js (1319 MB heap size)
 PASS  lib/rules/selector-list-comma-newline-before/__tests__/index.js (1330 MB heap size)
 PASS  lib/rules/selector-pseudo-class-no-unknown/__tests__/index.js (1346 MB heap size)
 PASS  lib/rules/selector-list-comma-space-after/__tests__/index.js (1362 MB heap size)
 PASS  lib/rules/value-list-comma-space-after/__tests__/index.js (1373 MB heap size)
 PASS  lib/rules/selector-max-universal/__tests__/index.js (1382 MB heap size)
 PASS  lib/rules/declaration-block-semicolon-newline-before/__tests__/index.js (1395 MB heap size)
 PASS  lib/rules/selector-max-combinators/__tests__/index.js (83.429s, 1404 MB heap size)

 RUNS  lib/rules/media-query-list-comma-newline-after/__tests__/index.js

<--- Last few GCs --->

[64616:0x102801600]   303366 ms: Mark-sweep 1411.4 (1537.1) -> 1411.4 (1517.6) MB, 1593.0 / 0.0 ms  (+ 0.0 ms in 0 steps since start of marking, biggest step 0.0 ms, walltime since start of marking 1593 ms) last resort GC in old space requested
[64616:0x102801600]   304956 ms: Mark-sweep 1411.4 (1517.6) -> 1411.4 (1517.6) MB, 1589.5 / 0.0 ms  last resort GC in old space requested


<--- JS stacktrace --->

==== JS stack trace =========================================

Security context: 0x2539c10a5ec1 <JSObject>
    1: /* anonymous */(aka /* anonymous */) [/Users/aleks/projects/stylelint/node_modules/caniuse-lite/dist/unpacker/feature.js:~48] [pc=0x76d921fa231](this=0x2539e1482311 <undefined>,v=0x253927cf50f9 <String[2]: mB>)
    2: arguments adaptor frame: 3->1
    3: forEach(this=0x2539b9b48041 <JSArray[3]>)
    5: /* anonymous */(aka /* anonymous */) [/Users/aleks/projects/stylelint/node_modules/cani...

FATAL ERROR: CALL_AND_RETRY_LAST Allocation failed - JavaScript heap out of memory
 1: node::Abort() [/usr/local/bin/node]
 2: node::FatalException(v8::Isolate*, v8::Local<v8::Value>, v8::Local<v8::Message>) [/usr/local/bin/node]
 3: v8::internal::V8::FatalProcessOutOfMemory(char const*, bool) [/usr/local/bin/node]
 4: v8::internal::Factory::NewTransitionArray(int) [/usr/local/bin/node]
 5: v8::internal::TransitionArray::Insert(v8::internal::Handle<v8::internal::Map>, v8::internal::Handle<v8::internal::Name>, v8::internal::Handle<v8::internal::Map>, v8::internal::SimpleTransitionFlag) [/usr/local/bin/node]
 6: v8::internal::Map::CopyReplaceDescriptors(v8::internal::Handle<v8::internal::Map>, v8::internal::Handle<v8::internal::DescriptorArray>, v8::internal::Handle<v8::internal::LayoutDescriptor>, v8::internal::TransitionFlag, v8::internal::MaybeHandle<v8::internal::Name>, char const*, v8::internal::SimpleTransitionFlag) [/usr/local/bin/node]
 7: v8::internal::Map::CopyAddDescriptor(v8::internal::Handle<v8::internal::Map>, v8::internal::Descriptor*, v8::internal::TransitionFlag) [/usr/local/bin/node]
 8: v8::internal::Map::CopyWithField(v8::internal::Handle<v8::internal::Map>, v8::internal::Handle<v8::internal::Name>, v8::internal::Handle<v8::internal::FieldType>, v8::internal::PropertyAttributes, v8::internal::PropertyConstness, v8::internal::Representation, v8::internal::TransitionFlag) [/usr/local/bin/node]
 9: v8::internal::Map::TransitionToDataProperty(v8::internal::Handle<v8::internal::Map>, v8::internal::Handle<v8::internal::Name>, v8::internal::Handle<v8::internal::Object>, v8::internal::PropertyAttributes, v8::internal::PropertyConstness, v8::internal::Object::StoreFromKeyed) [/usr/local/bin/node]
10: v8::internal::LookupIterator::PrepareTransitionToDataProperty(v8::internal::Handle<v8::internal::JSObject>, v8::internal::Handle<v8::internal::Object>, v8::internal::PropertyAttributes, v8::internal::Object::StoreFromKeyed) [/usr/local/bin/node]
11: v8::internal::StoreIC::LookupForWrite(v8::internal::LookupIterator*, v8::internal::Handle<v8::internal::Object>, v8::internal::Object::StoreFromKeyed) [/usr/local/bin/node]
12: v8::internal::StoreIC::UpdateCaches(v8::internal::LookupIterator*, v8::internal::Handle<v8::internal::Object>, v8::internal::Object::StoreFromKeyed) [/usr/local/bin/node]
13: v8::internal::StoreIC::Store(v8::internal::Handle<v8::internal::Object>, v8::internal::Handle<v8::internal::Name>, v8::internal::Handle<v8::internal::Object>, v8::internal::Object::StoreFromKeyed) [/usr/local/bin/node]
14: v8::internal::KeyedStoreIC::Store(v8::internal::Handle<v8::internal::Object>, v8::internal::Handle<v8::internal::Object>, v8::internal::Handle<v8::internal::Object>) [/usr/local/bin/node]
15: v8::internal::Runtime_KeyedStoreIC_Miss(int, v8::internal::Object**, v8::internal::Isolate*) [/usr/local/bin/node]
16: 0x76d91e8463d
17: 0x76d921fa231

Old version works:

Jest 21.2.1: $ npm run jest -- --runInBand --logHeapUsage
$ npm run jest -- --runInBand --logHeapUsage

> stylelint@8.4.0 jest /Users/aleks/projects/stylelint
> jest "--runInBand" "--logHeapUsage"

 PASS  lib/rules/at-rule-empty-line-before/__tests__/index.js (64 MB heap size)
 PASS  system-tests/001/001.test.js (108 MB heap size)
 PASS  lib/rules/selector-no-qualifying-type/__tests__/index.js (111 MB heap size)
 PASS  lib/rules/selector-max-empty-lines/__tests__/index.js (157 MB heap size)
 PASS  system-tests/004/004.test.js (129 MB heap size)
 PASS  lib/rules/value-keyword-case/__tests__/index.js (167 MB heap size)
 PASS  lib/rules/selector-attribute-operator-space-before/__tests__/index.js (211 MB heap size)
 PASS  lib/rules/selector-attribute-operator-space-after/__tests__/index.js (210 MB heap size)
 PASS  lib/rules/declaration-empty-line-before/__tests__/index.js (236 MB heap size)
 PASS  lib/rules/rule-empty-line-before/__tests__/index.js (261 MB heap size)
 PASS  lib/rules/custom-property-empty-line-before/__tests__/index.js (285 MB heap size)
 PASS  system-tests/005/005.test.js (244 MB heap size)
 PASS  lib/__tests__/needlessDisables.test.js (256 MB heap size)
 PASS  lib/rules/color-named/__tests__/index.js (279 MB heap size)
 PASS  lib/rules/no-extra-semicolons/__tests__/index.js (303 MB heap size)
 PASS  lib/rules/selector-attribute-brackets-space-inside/__tests__/index.js (324 MB heap size)
 PASS  lib/rules/indentation/__tests__/rules.js (343 MB heap size)
 PASS  lib/rules/property-case/__tests__/index.js (367 MB heap size)
 PASS  lib/rules/function-url-quotes/__tests__/index.js (288 MB heap size)
 PASS  lib/rules/selector-pseudo-class-case/__tests__/index.js (316 MB heap size)
 PASS  lib/rules/font-family-name-quotes/__tests__/index.js (339 MB heap size)
 PASS  lib/rules/comment-empty-line-before/__tests__/index.js (365 MB heap size)
 PASS  lib/rules/media-query-list-comma-space-after/__tests__/index.js (379 MB heap size)
 PASS  lib/rules/unit-case/__tests__/index.js (402 MB heap size)
 PASS  lib/rules/block-closing-brace-newline-after/__tests__/index.js (426 MB heap size)
 PASS  lib/rules/indentation/__tests__/functions.js (441 MB heap size)
 PASS  lib/rules/unit-whitelist/__tests__/index.js (465 MB heap size)
 PASS  lib/rules/shorthand-property-no-redundant-values/__tests__/index.js (490 MB heap size)
 PASS  lib/rules/block-closing-brace-space-after/__tests__/index.js (510 MB heap size)
 PASS  lib/rules/selector-pseudo-element-case/__tests__/index.js (532 MB heap size)
 PASS  lib/rules/max-line-length/__tests__/index.js (393 MB heap size)
 PASS  lib/rules/block-opening-brace-space-before/__tests__/index.js (416 MB heap size)
 PASS  lib/rules/function-parentheses-space-inside/__tests__/index.js (437 MB heap size)
 PASS  lib/rules/block-opening-brace-newline-before/__tests__/index.js (458 MB heap size)
 PASS  lib/rules/at-rule-name-space-after/__tests__/index.js (476 MB heap size)
 PASS  lib/rules/unit-no-unknown/__tests__/index.js (494 MB heap size)
 PASS  lib/rules/unit-blacklist/__tests__/index.js (523 MB heap size)
 PASS  lib/rules/selector-max-specificity/__tests__/index.js (535 MB heap size)
 PASS  lib/rules/length-zero-no-unit/__tests__/index.js (562 MB heap size)
 PASS  lib/__tests__/ignore.test.js (572 MB heap size)
 PASS  lib/rules/selector-combinator-space-after/__tests__/index.js (594 MB heap size)
 PASS  lib/rules/number-leading-zero/__tests__/index.js (620 MB heap size)
 PASS  system-tests/002/002.test.js (629 MB heap size)
 PASS  lib/rules/indentation/__tests__/at-rules.js (652 MB heap size)
 PASS  lib/rules/selector-max-type/__tests__/index.js (485 MB heap size)
 PASS  lib/rules/function-name-case/__tests__/index.js (506 MB heap size)
 PASS  lib/rules/at-rule-name-newline-after/__tests__/index.js (530 MB heap size)
 PASS  lib/rules/block-closing-brace-space-before/__tests__/index.js (544 MB heap size)
 PASS  lib/rules/media-feature-name-case/__tests__/index.js (570 MB heap size)
 PASS  lib/rules/selector-combinator-space-before/__tests__/index.js (593 MB heap size)
 PASS  lib/rules/block-opening-brace-space-after/__tests__/index.js (606 MB heap size)
 PASS  lib/rules/selector-class-pattern/__tests__/index.js (623 MB heap size)
 PASS  lib/rules/at-rule-name-case/__tests__/index.js (643 MB heap size)
 PASS  lib/rules/function-calc-no-unspaced-operator/__tests__/index.js (665 MB heap size)
 PASS  lib/__tests__/standalone.test.js (686 MB heap size)
 PASS  lib/rules/function-max-empty-lines/__tests__/index.js (702 MB heap size)
 PASS  lib/rules/function-comma-space-after/__tests__/index.js (723 MB heap size)
 PASS  lib/rules/function-comma-space-before/__tests__/index.js (742 MB heap size)
 PASS  lib/rules/declaration-property-unit-whitelist/__tests__/index.js (753 MB heap size)
 PASS  lib/rules/block-closing-brace-newline-before/__tests__/index.js (771 MB heap size)
 PASS  lib/rules/selector-type-no-unknown/__tests__/index.js (791 MB heap size)
 PASS  lib/rules/function-comma-newline-after/__tests__/index.js (809 MB heap size)
 PASS  lib/rules/selector-nested-pattern/__tests__/index.js (579 MB heap size)
 PASS  lib/rules/selector-list-comma-newline-after/__tests__/index.js (594 MB heap size)
 PASS  lib/rules/selector-max-compound-selectors/__tests__/index.js (608 MB heap size)
 PASS  lib/rules/font-weight-notation/__tests__/index.js (634 MB heap size)
 PASS  lib/rules/function-url-scheme-whitelist/__tests__/index.js (648 MB heap size)
 PASS  lib/rules/string-quotes/__tests__/index.js (663 MB heap size)
 PASS  lib/rules/block-closing-brace-empty-line-before/__tests__/index.js (692 MB heap size)
 PASS  lib/rules/color-hex-length/__tests__/index.js (703 MB heap size)
 PASS  lib/rules/block-opening-brace-newline-after/__tests__/index.js (720 MB heap size)
 PASS  lib/rules/no-invalid-double-slash-comments/__tests__/index.js (733 MB heap size)
 PASS  lib/__tests__/standalone-syntax.test.js (753 MB heap size)
 PASS  lib/rules/no-missing-end-of-source-newline/__tests__/index.js (769 MB heap size)
 PASS  lib/rules/function-comma-newline-before/__tests__/index.js (781 MB heap size)
 PASS  lib/rules/font-family-no-duplicate-names/__tests__/index.js (798 MB heap size)
 PASS  lib/rules/media-query-list-comma-space-before/__tests__/index.js (815 MB heap size)
 PASS  lib/rules/declaration-block-semicolon-newline-after/__tests__/index.js (838 MB heap size)
 PASS  lib/rules/selector-pseudo-class-parentheses-space-inside/__tests__/index.js (850 MB heap size)
 PASS  lib/rules/no-eol-whitespace/__tests__/index.js (871 MB heap size)
 PASS  lib/rules/selector-attribute-quotes/__tests__/index.js (890 MB heap size)
 PASS  lib/rules/selector-list-comma-space-before/__tests__/index.js (901 MB heap size)
 PASS  lib/rules/selector-type-case/__tests__/index.js (921 MB heap size)
 PASS  system-tests/003/003.test.js (930 MB heap size)
 PASS  lib/rules/function-parentheses-newline-inside/__tests__/index.js (952 MB heap size)
 PASS  lib/rules/color-hex-case/__tests__/index.js (970 MB heap size)
 PASS  lib/rules/comment-word-blacklist/__tests__/index.js (986 MB heap size)
 PASS  lib/rules/number-no-trailing-zeros/__tests__/index.js (718 MB heap size)
 PASS  lib/rules/selector-max-attribute/__tests__/index.js (739 MB heap size)
 PASS  lib/rules/media-query-list-comma-newline-before/__tests__/index.js (758 MB heap size)
 PASS  lib/rules/selector-max-id/__tests__/index.js (777 MB heap size)
 PASS  lib/rules/property-no-unknown/__tests__/index.js (792 MB heap size)
 PASS  lib/rules/declaration-block-semicolon-space-before/__tests__/index.js (803 MB heap size)
 PASS  lib/rules/time-min-milliseconds/__tests__/index.js (826 MB heap size)
 PASS  lib/rules/function-linear-gradient-no-nonstandard-direction/__tests__/index.js (835 MB heap size)
 PASS  lib/rules/value-list-comma-space-before/__tests__/index.js (856 MB heap size)
 PASS  lib/rules/function-url-scheme-blacklist/__tests__/index.js (874 MB heap size)
 PASS  lib/rules/value-list-comma-newline-before/__tests__/index.js (888 MB heap size)
 PASS  lib/rules/selector-list-comma-newline-before/__tests__/index.js (905 MB heap size)
 PASS  lib/rules/selector-pseudo-class-no-unknown/__tests__/index.js (924 MB heap size)
 PASS  lib/rules/selector-list-comma-space-after/__tests__/index.js (946 MB heap size)
 PASS  lib/rules/value-list-comma-space-after/__tests__/index.js (955 MB heap size)
 PASS  lib/rules/selector-max-universal/__tests__/index.js (970 MB heap size)
 PASS  lib/rules/declaration-block-semicolon-newline-before/__tests__/index.js (988 MB heap size)
 PASS  lib/rules/selector-max-combinators/__tests__/index.js (1005 MB heap size)
 PASS  lib/rules/media-query-list-comma-newline-after/__tests__/index.js (1026 MB heap size)
 PASS  lib/__tests__/disableRanges-integration.test.js (1040 MB heap size)
 PASS  lib/rules/selector-pseudo-element-no-unknown/__tests__/index.js (1058 MB heap size)
 PASS  lib/rules/comment-whitespace-inside/__tests__/index.js (756 MB heap size)
 PASS  lib/rules/number-max-precision/__tests__/index.js (774 MB heap size)
 PASS  lib/rules/declaration-block-semicolon-space-after/__tests__/index.js (792 MB heap size)
 PASS  lib/formatters/__tests__/verboseFormatter.test.js (805 MB heap size)
 PASS  lib/rules/no-descending-specificity/__tests__/index.js (826 MB heap size)
 PASS  lib/formatters/__tests__/stringFormatter.test.js (839 MB heap size)
 PASS  lib/rules/max-empty-lines/__tests__/index.js (853 MB heap size)
 PASS  lib/rules/value-list-max-empty-lines/__tests__/index.js (866 MB heap size)
 PASS  lib/rules/media-feature-name-no-unknown/__tests__/index.js (883 MB heap size)
 PASS  system-tests/fix/fix.test.js (897 MB heap size)
 PASS  lib/rules/declaration-colon-space-after/__tests__/index.js (912 MB heap size)
 PASS  lib/rules/function-blacklist/__tests__/index.js (927 MB heap size)
 PASS  lib/rules/declaration-block-no-duplicate-properties/__tests__/index.js (943 MB heap size)
 PASS  lib/rules/indentation/__tests__/selectors.js (966 MB heap size)
 PASS  lib/rules/media-feature-colon-space-before/__tests__/index.js (978 MB heap size)
 PASS  lib/rules/media-feature-parentheses-space-inside/__tests__/index.js (993 MB heap size)
 PASS  lib/rules/selector-max-class/__tests__/index.js (1006 MB heap size)
 PASS  lib/rules/selector-pseudo-class-whitelist/__tests__/index.js (1025 MB heap size)
 PASS  lib/rules/no-duplicate-selectors/__tests__/index.js (1034 MB heap size)
 PASS  lib/rules/property-whitelist/__tests__/index.js (1057 MB heap size)
 PASS  lib/rules/function-whitespace-after/__tests__/index.js (1072 MB heap size)
 PASS  lib/rules/value-list-comma-newline-after/__tests__/index.js (735 MB heap size)
 PASS  lib/rules/value-no-vendor-prefix/__tests__/index.js (747 MB heap size)
 PASS  lib/rules/selector-pseudo-element-colon-notation/__tests__/index.js (761 MB heap size)
 PASS  lib/formatters/__tests__/needlessDisablesStringFormatter.test.js (784 MB heap size)
 PASS  lib/rules/selector-id-pattern/__tests__/index.js (792 MB heap size)
 PASS  lib/__tests__/standalone-cache.test.js (811 MB heap size)
 PASS  lib/rules/property-blacklist/__tests__/index.js (822 MB heap size)
 PASS  lib/rules/max-nesting-depth/__tests__/index.js (834 MB heap size)
 PASS  lib/rules/media-feature-range-operator-space-after/__tests__/index.js (858 MB heap size)
 PASS  lib/rules/at-rule-semicolon-space-before/__tests__/index.js (868 MB heap size)
 PASS  lib/rules/declaration-property-unit-blacklist/__tests__/index.js (880 MB heap size)
 PASS  lib/rules/media-feature-range-operator-space-before/__tests__/index.js (903 MB heap size)
 PASS  lib/rules/media-feature-name-whitelist/__tests__/index.js (913 MB heap size)
 PASS  lib/rules/at-rule-no-unknown/__tests__/index.js (934 MB heap size)
 PASS  lib/rules/declaration-colon-space-before/__tests__/index.js (211 MB heap size)
 PASS  lib/rules/indentation/__tests__/comments.js (230 MB heap size)
 PASS  lib/rules/no-unknown-animations/__tests__/index.js (246 MB heap size)
 PASS  lib/rules/media-feature-name-blacklist/__tests__/index.js (257 MB heap size)
 PASS  lib/rules/at-rule-semicolon-newline-after/__tests__/index.js (277 MB heap size)
 PASS  lib/rules/declaration-block-trailing-semicolon/__tests__/index.js (285 MB heap size)
 PASS  lib/rules/declaration-block-no-redundant-longhand-properties/__tests__/index.js (304 MB heap size)
 PASS  lib/rules/declaration-colon-newline-after/__tests__/index.js (312 MB heap size)
 PASS  lib/rules/function-whitelist/__tests__/index.js (333 MB heap size)
 PASS  lib/rules/declaration-bang-space-after/__tests__/index.js (341 MB heap size)
 PASS  lib/rules/selector-attribute-operator-whitelist/__tests__/index.js (358 MB heap size)
 PASS  lib/rules/selector-descendant-combinator-no-non-space/__tests__/index.js (326 MB heap size)
 PASS  lib/rules/declaration-bang-space-before/__tests__/index.js (344 MB heap size)
 PASS  lib/rules/declaration-property-value-blacklist/__tests__/index.js (364 MB heap size)
 PASS  lib/rules/media-feature-colon-space-after/__tests__/index.js (376 MB heap size)
 PASS  lib/__tests__/plugins.test.js (386 MB heap size)
 PASS  lib/rules/custom-media-pattern/__tests__/index.js (405 MB heap size)
 PASS  lib/rules/function-url-no-scheme-relative/__tests__/index.js (424 MB heap size)
 PASS  lib/rules/selector-pseudo-class-blacklist/__tests__/index.js (431 MB heap size)
 PASS  lib/rules/font-family-no-missing-generic-family-keyword/__tests__/index.js (449 MB heap size)
 PASS  lib/rules/declaration-block-single-line-max-declarations/__tests__/index.js (466 MB heap size)
 PASS  lib/rules/selector-attribute-operator-blacklist/__tests__/index.js (471 MB heap size)
 PASS  lib/rules/no-duplicate-at-import-rules/__tests__/index.js (488 MB heap size)
 PASS  lib/rules/selector-no-vendor-prefix/__tests__/index.js (504 MB heap size)
 PASS  lib/rules/at-rule-blacklist/__tests__/index.js (523 MB heap size)
 PASS  lib/rules/declaration-block-no-shorthand-property-overrides/__tests__/index.js (528 MB heap size)
 PASS  lib/__tests__/processors.test.js (545 MB heap size)
 PASS  lib/rules/property-no-vendor-prefix/__tests__/index.js (562 MB heap size)
 PASS  lib/rules/color-no-invalid-hex/__tests__/index.js (524 MB heap size)
 PASS  lib/rules/color-no-hex/__tests__/index.js (528 MB heap size)
 PASS  lib/rules/indentation/__tests__/html.js (543 MB heap size)
 PASS  lib/rules/at-rule-whitelist/__tests__/index.js (560 MB heap size)
 PASS  lib/rules/custom-property-pattern/__tests__/index.js (576 MB heap size)
 PASS  lib/__tests__/stylelintignore-test/stylelintignore.test.js (587 MB heap size)
 PASS  lib/__tests__/integration.test.js (601 MB heap size)
 PASS  lib/rules/no-empty-source/__tests__/index.js (615 MB heap size)
 PASS  lib/rules/block-no-empty/__tests__/index.js (632 MB heap size)
 PASS  lib/rules/keyframe-declaration-no-important/__tests__/index.js (646 MB heap size)
 PASS  lib/rules/media-feature-name-no-vendor-prefix/__tests__/index.js (659 MB heap size)
 PASS  lib/rules/declaration-property-value-whitelist/__tests__/index.js (672 MB heap size)
 PASS  lib/rules/comment-no-empty/__tests__/index.js (687 MB heap size)
 PASS  lib/__tests__/createLinter.test.js (697 MB heap size)
 PASS  lib/rules/string-no-newline/__tests__/index.js (708 MB heap size)
 PASS  lib/utils/__tests__/nodeContextLookup.test.js (718 MB heap size)
 PASS  lib/__tests__/standalone-needlessDisables.test.js (730 MB heap size)
 PASS  lib/__tests__/ignoreDisables.test.js (741 MB heap size)
 PASS  lib/utils/__tests__/isStandardSyntaxUrl.test.js (758 MB heap size)
 PASS  lib/utils/__tests__/isStandardSyntaxRule.test.js (772 MB heap size)
 PASS  lib/__tests__/postcssPlugin.test.js (783 MB heap size)
 PASS  lib/rules/declaration-no-important/__tests__/index.js (806 MB heap size)
 PASS  lib/__tests__/disableRanges.test.js (811 MB heap size)
 PASS  lib/rules/at-rule-no-vendor-prefix/__tests__/index.js (823 MB heap size)
 PASS  lib/utils/__tests__/isStandardSyntaxTypeSelector.test.js (835 MB heap size)
 PASS  lib/__tests__/extends.test.js (859 MB heap size)
 PASS  lib/utils/__tests__/validateOptions.test.js (865 MB heap size)
 PASS  lib/__tests__/normalizeRuleSettings-integration.test.js (694 MB heap size)
 PASS  lib/utils/__tests__/isStandardSyntaxMediaFeatureName.test.js (715 MB heap size)
 PASS  lib/__tests__/normalizeRuleSettings.test.js (726 MB heap size)
 PASS  lib/utils/__tests__/addEmptyLineBefore.test.js (736 MB heap size)
 PASS  lib/utils/__tests__/validateObjectWithStringArrayProps.test.js (744 MB heap size)
 PASS  lib/utils/__tests__/blurFunctionArguments.test.js (764 MB heap size)
 PASS  lib/utils/__tests__/report.test.js (775 MB heap size)
 PASS  lib/__tests__/message.test.js (784 MB heap size)
 PASS  lib/__tests__/formatters.test.js (804 MB heap size)
 PASS  lib/utils/__tests__/isStandardSyntaxDeclaration.test.js (815 MB heap size)
 PASS  lib/utils/__tests__/isBlocklessAtRuleAfterSameNameBlocklessAtRule.test.js (825 MB heap size)
 PASS  lib/__tests__/standalone-formatter.test.js (833 MB heap size)
 PASS  lib/utils/__tests__/findListStyleType.test.js (844 MB heap size)
 PASS  lib/utils/__tests__/isAfterComment.test.js (865 MB heap size)
 PASS  lib/testUtils/__tests__/mergeTestDescriptions.test.js (873 MB heap size)
 PASS  lib/utils/__tests__/blurInterpolation.test.js (881 MB heap size)
 PASS  lib/utils/__tests__/isValidHex.test.js (902 MB heap size)
 PASS  lib/utils/__tests__/findFontFamily.test.js (913 MB heap size)
 PASS  lib/testUtils/__tests__/createRuleTester.test.js (922 MB heap size)
 PASS  lib/utils/__tests__/isStandardSyntaxAtRule.test.js (933 MB heap size)
 PASS  lib/utils/__tests__/isSingleLineString.test.js (953 MB heap size)
 PASS  lib/utils/__tests__/functionArgumentsSearch.test.js (961 MB heap size)
 PASS  lib/utils/__tests__/isStandardSyntaxSelector.test.js (972 MB heap size)
 PASS  lib/utils/__tests__/blurComments.test.js (993 MB heap size)
 PASS  lib/utils/__tests__/optionsMatches.test.js (1001 MB heap size)
 PASS  lib/utils/__tests__/isCounterIncrementCustomIdentValue.test.js (1009 MB heap size)
 PASS  lib/utils/__tests__/isStandardSyntaxValue.test.js (1018 MB heap size)
 PASS  lib/utils/__tests__/isKeyframeRule.test.js (1039 MB heap size)
 PASS  lib/utils/__tests__/isStandardSyntaxFunction.test.js (1047 MB heap size)
 PASS  lib/utils/__tests__/isSharedLineComment.test.js (836 MB heap size)
 PASS  lib/utils/__tests__/isStandardSyntaxMediaFeature.test.js (845 MB heap size)
 PASS  lib/utils/__tests__/getSchemeFromUrl.test.js (853 MB heap size)
 PASS  lib/utils/__tests__/beforeBlockString.test.js (875 MB heap size)
 PASS  lib/utils/__tests__/isBlocklessAtRuleAfterBlocklessAtRule.test.js (883 MB heap size)
 PASS  lib/utils/__tests__/matchesStringOrRegExp.test.js (893 MB heap size)
 PASS  lib/utils/__tests__/removeEmptyLineBefore.test.js (903 MB heap size)
 PASS  lib/utils/__tests__/checkAgainstRule.test.js (924 MB heap size)
 PASS  lib/utils/__tests__/getUnitFromValueNode.test.js (934 MB heap size)
 PASS  lib/utils/__tests__/isFirstNested.test.js (943 MB heap size)
 PASS  lib/utils/__tests__/getPreviousNonSharedLineCommentNode.test.js (952 MB heap size)
 PASS  lib/utils/__tests__/atRuleParamIndex.test.js (972 MB heap size)
 PASS  lib/__tests__/standalone-quiet.test.js (979 MB heap size)
 PASS  lib/utils/__tests__/isKeyframeSelector.test.js (988 MB heap size)
 PASS  lib/utils/__tests__/isCustomPropertySet.test.js (1008 MB heap size)
 PASS  lib/__tests__/standalone-deprecations.test.js (1015 MB heap size)
 PASS  lib/utils/__tests__/isCustomElement.test.js (1025 MB heap size)
 PASS  lib/utils/__tests__/hasBlock.test.js (1047 MB heap size)
 PASS  lib/utils/__tests__/getNextNonSharedLineCommentNode.test.js (1055 MB heap size)
 PASS  lib/utils/__tests__/findAnimationName.test.js (1064 MB heap size)
 PASS  lib/utils/__tests__/blockString.test.js (1084 MB heap size)
 PASS  lib/__tests__/defaultSeverity.test.js (1091 MB heap size)
 PASS  lib/utils/__tests__/hasEmptyBlock.test.js (1100 MB heap size)
 PASS  lib/utils/__tests__/isStandardSyntaxProperty.test.js (795 MB heap size)
 PASS  lib/utils/__tests__/isCustomProperty.test.js (802 MB heap size)
 PASS  lib/utils/__tests__/isNumbery.test.js (822 MB heap size)
 PASS  lib/__tests__/standalone-parseErrors.test.js (829 MB heap size)
 PASS  lib/utils/__tests__/hasInterpolation.test.js (838 MB heap size)
 PASS  lib/utils/__tests__/containsString.test.js (859 MB heap size)
 PASS  lib/formatters/__tests__/jsonFormatter.test.js (866 MB heap size)
 PASS  lib/utils/__tests__/isCustomSelector.test.js (873 MB heap size)
 PASS  lib/utils/__tests__/isAfterSingleLineComment.test.js (894 MB heap size)
 PASS  lib/utils/__tests__/declarationValueIndex.test.js (901 MB heap size)
 PASS  lib/utils/__tests__/ruleMessages.test.js (909 MB heap size)
 PASS  lib/utils/__tests__/isValidFontSize.test.js (929 MB heap size)
 PASS  lib/utils/__tests__/isRangeContextMediaFeature.test.js (936 MB heap size)
 PASS  lib/utils/__tests__/isCounterResetCustomIdentValue.test.js (957 MB heap size)
 PASS  lib/utils/__tests__/nextNonCommentNode.test.js (965 MB heap size)
 PASS  lib/utils/__tests__/isVariable.test.js (973 MB heap size)
 PASS  lib/utils/__tests__/isCustomMediaQuery.test.js (994 MB heap size)
 PASS  lib/utils/__tests__/hasEmptyLine.test.js (1002 MB heap size)
 PASS  lib/utils/__tests__/isOnlyWhitespace.test.js (1009 MB heap size)
 PASS  lib/utils/__tests__/findAtRuleContext.test.js (1030 MB heap size)

Test Suites: 270 passed, 270 total
Tests:       13254 passed, 13254 total
Snapshots:   6 passed, 6 total
Time:        112.732s
Ran all test suites.

Comparing heap size in the old and new version I see that old version clears heap more often and more successful.

@hudochenkov
Copy link

I thought the problem could be because of our code. We run all our tests via custom testRule(), which is included in setupFiles configuration. But apparently, it's not our code problem. I replaced our setup file and testRule() with a simple script:

'use strict';

global.testRule = () => {
  test('test', () => {
    expect(true).toBe(true);
  });
};

Even with this script --runInBand failed because of out of memory.

All of this is on Node.js 8.9.1 and npm 5.5.1. macOS 10.12.6 on MacBook Pro with 16GB memory.

@OverseePublic
Copy link
Author

Could the contributors / authors help us identify whether this is a bug or not?

Thanks.

@mjesun
Copy link
Contributor

mjesun commented Dec 29, 2017

Whenever you run with -i, all tests are executed from the main process. This means that the memory consumption will grow as much as it can within one single process. On the other hand, when using multiple processes, the memory consumption is spread through them, thus reducing the memory per process used.

To get more accurate results, you should make sure that the GC is run after each test. Jest already does that, but it needs to be explicitly exposed. You can do that as a fast test by adding --expose-gc to the node_modules/.bin/jest shebang line.

@OverseePublic
Copy link
Author

OverseePublic commented Dec 29, 2017

Hmm, even with the --expose-gc I get the increasing heap size. But the heap size is smaller. Maybe it's getting cleared more often?

#!/usr/bin/env node --expose-gc

> jest -i --silent --logHeapUsage

 PASS  __tests__/component.test.10000.js (203 MB heap size)
 PASS  __tests__/component.test.c.10000.js (364 MB heap size)
 PASS  __tests__/component.test.b.10000.js (514 MB heap size)

Test Suites: 3 passed, 3 total
Tests:       30000 passed, 30000 total
Snapshots:   0 total
Time:        12.667s

@OverseePublic
Copy link
Author

I also tested exposing and forcing global.gc() in afterEach hook in setupTestFrameworkScriptFile and it hangs probably due to extra global.gc() call I added.

Code is in branch force-clean and the command is npm run test:i-gc

@mjesun
Copy link
Contributor

mjesun commented Jan 2, 2018

If the GC is exposed, it will automatically be ran after each test (see here). Running yourself the GC on the afterEach should have no effect, as long as you are using --logHeapUsage as well.

The memory growth you see from test to test is due to several reasons:

  • We have some leaks on the Jest codebase, which we work for mitigating them.
  • The partial results of each test execution (including console output, errors, stack traces and other information) needs to be preserved, so the total memory at the end of the test execution will be higher than at the beginning.
  • Some test and user code cause leaks itself (e.g. overriding native methods or extending objects, like fs or http.Server.prototype). We are also trying to mitigate those (as in Re-inject native Node modules #4970), but these ones are way more complex.

Hope that solves the mistery! 🙂

@OverseePublic
Copy link
Author

Gotcha! Thanks. I wondered whether I incorrectly setup the test. I will dig in and see if I can be a contribution :)

Thanks for the help / comments. Appreciated!

@rickhanlonii
Copy link
Member

@hudochenkov I confirmed that the above PR fixes the leak in stylelint for Jest 22

Before

After

That PR also fixes the --detectLeaks argument. I ran your tests with this an I see a number of userland leaks you'll want to look into once this lands:

@rickhanlonii
Copy link
Member

I think this can be closed:

@cpojer cpojer closed this as completed Jan 11, 2018
@hudochenkov
Copy link

@rickhanlonii thank you for your help!

@github-actions
Copy link

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
Please note this issue tracker is not a help forum. We recommend using StackOverflow or our discord channel for questions.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 13, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants