diff --git a/test/parallel/test-v8-serialize-leak.js b/test/parallel/test-v8-serialize-leak.js index 4340396bcf77aa..f57f623a46add4 100644 --- a/test/parallel/test-v8-serialize-leak.js +++ b/test/parallel/test-v8-serialize-leak.js @@ -1,18 +1,18 @@ -'use strict'; -// Flags: --expose-gc - -require('../common'); -const v8 = require('v8'); -const assert = require('assert'); - -const before = process.memoryUsage.rss(); - -for (let i = 0; i < 1000000; i++) { - v8.serialize(''); -} - -global.gc(); - -const after = process.memoryUsage.rss(); - -assert(after - before < 1024 * 1024 * 10, `before=${before} after=${after}`); +'use strict'; +// Flags: --expose-gc + +require('../common'); +const v8 = require('v8'); +const assert = require('assert'); + +const before = process.memoryUsage.rss(); + +for (let i = 0; i < 1000000; i++) { + v8.serialize(''); +} + +global.gc(); + +const after = process.memoryUsage.rss(); + +assert(after - before < 1024 * 1024 * 10, `before=${before} after=${after}`);