@@ -1068,7 +1068,7 @@ getJasmineRequireObj().Env = function(j$) {
|
|||||||
this.it = function(description, fn, timeout) {
|
this.it = function(description, fn, timeout) {
|
||||||
// it() sometimes doesn't have a fn argument, so only check the type if
|
// it() sometimes doesn't have a fn argument, so only check the type if
|
||||||
// it's given.
|
// it's given.
|
||||||
if (arguments.length > 1) {
|
if (arguments.length > 1 && typeof fn !== 'undefined') {
|
||||||
ensureIsFunction(fn, 'it');
|
ensureIsFunction(fn, 'it');
|
||||||
}
|
}
|
||||||
var spec = specFactory(description, fn, currentDeclarationSuite, timeout);
|
var spec = specFactory(description, fn, currentDeclarationSuite, timeout);
|
||||||
@@ -1082,7 +1082,7 @@ getJasmineRequireObj().Env = function(j$) {
|
|||||||
this.xit = function(description, fn, timeout) {
|
this.xit = function(description, fn, timeout) {
|
||||||
// xit(), like it(), doesn't always have a fn argument, so only check the
|
// xit(), like it(), doesn't always have a fn argument, so only check the
|
||||||
// type when needed.
|
// type when needed.
|
||||||
if (arguments.length > 1) {
|
if (arguments.length > 1 && typeof fn !== 'undefined') {
|
||||||
ensureIsFunction(fn, 'xit');
|
ensureIsFunction(fn, 'xit');
|
||||||
}
|
}
|
||||||
var spec = this.it.apply(this, arguments);
|
var spec = this.it.apply(this, arguments);
|
||||||
@@ -2174,7 +2174,7 @@ getJasmineRequireObj().GlobalErrors = function(j$) {
|
|||||||
this.uninstall = function noop() {};
|
this.uninstall = function noop() {};
|
||||||
|
|
||||||
this.install = function install() {
|
this.install = function install() {
|
||||||
if (global.process && j$.isFunction_(global.process.on)) {
|
if (global.process && global.process.listeners && j$.isFunction_(global.process.on)) {
|
||||||
var originalHandlers = global.process.listeners('uncaughtException');
|
var originalHandlers = global.process.listeners('uncaughtException');
|
||||||
global.process.removeAllListeners('uncaughtException');
|
global.process.removeAllListeners('uncaughtException');
|
||||||
global.process.on('uncaughtException', onerror);
|
global.process.on('uncaughtException', onerror);
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ getJasmineRequireObj().GlobalErrors = function(j$) {
|
|||||||
this.uninstall = function noop() {};
|
this.uninstall = function noop() {};
|
||||||
|
|
||||||
this.install = function install() {
|
this.install = function install() {
|
||||||
if (global.process && j$.isFunction_(global.process.on)) {
|
if (global.process && global.process.listeners && j$.isFunction_(global.process.on)) {
|
||||||
var originalHandlers = global.process.listeners('uncaughtException');
|
var originalHandlers = global.process.listeners('uncaughtException');
|
||||||
global.process.removeAllListeners('uncaughtException');
|
global.process.removeAllListeners('uncaughtException');
|
||||||
global.process.on('uncaughtException', onerror);
|
global.process.on('uncaughtException', onerror);
|
||||||
|
|||||||
Reference in New Issue
Block a user