An improved yet backwards compatible drop-in replacement for JavaScript's built-in setTimeout and setInterval methods.
Tasks: Expose:
-
time of setXXX call
-
type: 0=setTimeout, 1=setInterval
-
handler:
-
tag: defaults to arguments.caller.toString()
-
firstInvTime: time of first invocation
-
interval:
-
attempted: number of times attempted to run
-
completed: number of times completed run
-
errors: attempted = completed + errors + "pending"
-
xxxxxxxhasRun: returns true if it has run at least once
New Signature:
-
setTimeout(handler, [ array of owners/tags ], interval), with the new argument being optional
Considerations
- Forward compatibility with timeout manager
- AMD and plain JavaScript versions
Install phantomjs. If you're on Windows, make sure you add phantomjs.exe's location to your path.
In the home directory, run the tests by
phantomjs test/jasmine2-junit-master/src/jasmine2-runner.js test/specrunner.html
based on the jasmine2 runner at https://github.com/sandermak/jasmine2-junit
Features: Information: export a JSON list of setXXX Hangs on to executed timeouts for XXX seconds, as specified Interface: setTimeout.manager().json() setTimeout.manager().table() outputs to console.table setTimeout.manager().show() creates an absolutely positioned floating tab which slides out Manipulation: Freeze? rearrange order of executions suspend reexecute run now