truman
Version:
Simple test fixtures for single page apps
25 lines (19 loc) • 428 B
JavaScript
let logImplementation = () => {}
let errorImplementation = () => {}
if (typeof console !== 'undefined') {
if (console.log) {
logImplementation = console.log.bind(console)
}
if (console.error) {
errorImplementation = console.error.bind(console)
}
}
module.exports = {
log () {
logImplementation.apply(null, arguments)
},
error () {
errorImplementation.apply(null, arguments)
}
}