Skip to content

Instantly share code, notes, and snippets.

@isaacs
Created March 15, 2012 21:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save isaacs/7b19cb5ed5f01081e457 to your computer and use it in GitHub Desktop.
Save isaacs/7b19cb5ed5f01081e457 to your computer and use it in GitHub Desktop.
commit 702b46c80dfe3ec8f67c15f802db9d2d86a40a6c
Author: isaacs <i@izs.me>
Date: Thu Mar 15 14:53:17 2012 -0700
Fix invalid timer test
Previously, setTimeout(fn, 0) would create a new Timer() object,
which has a close() method (and is a bit slower). The recent
change to more closely emulate browser setTimeout behavior dodges
this path, so this assertion is no longer valid.
diff --git a/test/simple/test-timers-zero-timeout.js b/test/simple/test-timers-zero-timeout.js
index 9f77d78..eb43f18 100644
--- a/test/simple/test-timers-zero-timeout.js
+++ b/test/simple/test-timers-zero-timeout.js
@@ -38,8 +38,6 @@ var assert = require('assert');
process.on('exit', function() {
assert.equal(ncalled, 1);
- // timer should be already closed
- assert.equal(timer.close(), -1);
});
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment