Make ospec work natively in browser environments
This commit is contained in:
parent
567ebb8b9f
commit
af35e4b446
1 changed files with 5 additions and 3 deletions
|
|
@ -1,7 +1,9 @@
|
||||||
/* eslint-disable global-require, no-bitwise, no-process-exit */
|
/* eslint-disable global-require, no-bitwise, no-process-exit */
|
||||||
"use strict"
|
"use strict"
|
||||||
|
;(function(m) {
|
||||||
module.exports = new function init(name) {
|
if (typeof module !== "undefined") module["exports"] = m()
|
||||||
|
else window.o = m()
|
||||||
|
})(function init(name) {
|
||||||
var spec = {}, subjects = [], results, only = null, ctx = spec, start, stack = 0, nextTickish, hasProcess = typeof process === "object", reporter, hasOwn = ({}).hasOwnProperty
|
var spec = {}, subjects = [], results, only = null, ctx = spec, start, stack = 0, nextTickish, hasProcess = typeof process === "object", reporter, hasOwn = ({}).hasOwnProperty
|
||||||
|
|
||||||
if (name != null) spec[name] = ctx = {}
|
if (name != null) spec[name] = ctx = {}
|
||||||
|
|
@ -265,4 +267,4 @@ module.exports = new function init(name) {
|
||||||
}
|
}
|
||||||
|
|
||||||
return o
|
return o
|
||||||
}
|
})
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue