Test empty function

Benchmark created on


Setup

let obj1 = {
    assert: (i) => {if( ! Number.isInteger(i)) throw new Error('nok')}
};
let obj2 = {
    assert: (_i) => {}
};

Test runner

Ready to run.

Testing in
TestOps/sec
test
try {
	obj1.assert(42)
}catch(e) {
	console.log(e)
}
ready
empty assert
try {
	obj2.assert(42)
} catch(e) {
	console.log(e)
}
ready
no functions
try {
	if( ! Number.isInteger(42)) throw new Error('nok')
} catch(e) {
	console.log(e)
}
ready

Revisions

You can edit these tests or add more tests to this page by appending /edit to the URL.