From 47635b99785063156525e0da7634e0fa08d6a084 Mon Sep 17 00:00:00 2001 From: John-David Dalton Date: Thu, 19 May 2016 21:35:44 -0700 Subject: [PATCH] Assign `setTimeout` to itself to avoid leak detection. --- test/test.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/test/test.js b/test/test.js index ae1921c44..708fa79a1 100644 --- a/test/test.js +++ b/test/test.js @@ -233,6 +233,9 @@ // Leak to avoid sporadic `noglobals` fails on Edge in Sauce Labs. root.msWDfn = undefined; + // Assign `setTimeout` to itself to avoid being flagged as a leak. + setProperty(root, 'setTimeout', setTimeout); + // Exit early if going to run tests in a PhantomJS web page. if (phantom && isModularize) { var page = require('webpage').create();