Commit db74749c authored by Sam Saccone's avatar Sam Saccone

tests: allow special casing for memory tests

parent 5b022456
{
"humble": {
"nodes": 30,
"listeners": 0
}
}
'use strict'; 'use strict';
var drool = require('drool'); var drool = require('drool');
var exceptions = require('./memory-exceptions.json');
var frameworkPathLookup = require('./framework-path-lookup'); var frameworkPathLookup = require('./framework-path-lookup');
var argv = require('optimist').default('laxMode', false).default('browser', 'chrome').argv; var argv = require('optimist').default('laxMode', false).default('browser', 'chrome').argv;
var driverConfig = { var driverConfig = {
...@@ -81,11 +82,11 @@ list.forEach(function (framework) { ...@@ -81,11 +82,11 @@ list.forEach(function (framework) {
(after.jsHeapSizeUsed - initial.jsHeapSizeUsed) + ', ' + listenerIncrease); (after.jsHeapSizeUsed - initial.jsHeapSizeUsed) + ', ' + listenerIncrease);
//https://code.google.com/p/chromium/issues/detail?id=516153 //https://code.google.com/p/chromium/issues/detail?id=516153
if (nodeIncrease > 5) { if (nodeIncrease > exceptions[framework.name].nodes || 0) {
throw new Error('Node Count leak detected!'); throw new Error('Node Count leak detected!');
} }
if (listenerIncrease > 0) { if (listenerIncrease > exceptions[framework.name].listeners || 0) {
throw new Error('Event Listener leak detected!'); throw new Error('Event Listener leak detected!');
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment