I have some JavaScript benchmark code that is supported to be running on browser. But I would like to run it on console mode of JavaScript engine such as 'd8' in V8 for testing purpose.
I have written empty variables and functions for each DOM variables and functions(e.g. document.getElementById
, etc.). But I cannot fully run the code since setTimeout()
and setInterval()
are supported by browser not from V8 engine. Is there a way to implement or simply emulate those functions in pure JavaScript code?
I appreciate any kind of comments.