Skip to content
This repository has been archived by the owner on Jun 26, 2020. It is now read-only.

Commit

Permalink
Extract magic numbers to constants.
Browse files Browse the repository at this point in the history
  • Loading branch information
jodator committed Jan 22, 2019
1 parent f8230e9 commit 44d1a44
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions tests/_utils/memory.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@

/* global window, document, setTimeout */

const TEST_TIMEOUT = 6000;
const GARBAGE_COLLECTOR_TIMEOUT = 500;

/**
* @param {Function} callback Callback with test suit body
*/
Expand All @@ -26,7 +29,7 @@ export function describeMemoryUsage( callback ) {
*/
export function testMemoryUsage( testName, editorCreator ) {
it( testName, function() {
this.timeout( 6000 );
this.timeout( TEST_TIMEOUT );

return runTest( editorCreator );
} );
Expand Down Expand Up @@ -119,7 +122,7 @@ function collectMemoryStats() {
usedJSHeapSize: memeInfo.usedJSHeapSize,
jsHeapSizeLimit: memeInfo.jsHeapSizeLimit
} );
}, 500 );
}, GARBAGE_COLLECTOR_TIMEOUT );
} );
}

Expand Down

0 comments on commit 44d1a44

Please sign in to comment.