@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
Copyright (c) 2008-2014 Pivotal Labs
|
Copyright (c) 2008-2015 Pivotal Labs
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining
|
Permission is hereby granted, free of charge, to any person obtaining
|
||||||
a copy of this software and associated documentation files (the
|
a copy of this software and associated documentation files (the
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
Copyright (c) 2008-2014 Pivotal Labs
|
Copyright (c) 2008-2015 Pivotal Labs
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining
|
Permission is hereby granted, free of charge, to any person obtaining
|
||||||
a copy of this software and associated documentation files (the
|
a copy of this software and associated documentation files (the
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
Copyright (c) 2008-2014 Pivotal Labs
|
Copyright (c) 2008-2015 Pivotal Labs
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining
|
Permission is hereby granted, free of charge, to any person obtaining
|
||||||
a copy of this software and associated documentation files (the
|
a copy of this software and associated documentation files (the
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
Copyright (c) 2008-2014 Pivotal Labs
|
Copyright (c) 2008-2015 Pivotal Labs
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining
|
Permission is hereby granted, free of charge, to any person obtaining
|
||||||
a copy of this software and associated documentation files (the
|
a copy of this software and associated documentation files (the
|
||||||
@@ -853,7 +853,8 @@ getJasmineRequireObj().Env = function(j$) {
|
|||||||
passed: false,
|
passed: false,
|
||||||
expected: '',
|
expected: '',
|
||||||
actual: '',
|
actual: '',
|
||||||
message: message
|
message: message,
|
||||||
|
error: error && error.message ? error : null
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
@@ -2419,7 +2420,7 @@ getJasmineRequireObj().matchersUtil = function(j$) {
|
|||||||
return result;
|
return result;
|
||||||
|
|
||||||
function has(obj, key) {
|
function has(obj, key) {
|
||||||
return obj.hasOwnProperty(key);
|
return Object.prototype.hasOwnProperty.call(obj, key);
|
||||||
}
|
}
|
||||||
|
|
||||||
function isFunction(obj) {
|
function isFunction(obj) {
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
Copyright (c) 2008-2014 Pivotal Labs
|
Copyright (c) 2008-2015 Pivotal Labs
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining
|
Permission is hereby granted, free of charge, to any person obtaining
|
||||||
a copy of this software and associated documentation files (the
|
a copy of this software and associated documentation files (the
|
||||||
|
|||||||
@@ -143,7 +143,8 @@ describe("Env integration", function() {
|
|||||||
|
|
||||||
it('explicitly fails a spec', function(done) {
|
it('explicitly fails a spec', function(done) {
|
||||||
var env = new j$.Env(),
|
var env = new j$.Env(),
|
||||||
specDone = jasmine.createSpy('specDone');
|
specDone = jasmine.createSpy('specDone'),
|
||||||
|
errorObj = new Error('error message');
|
||||||
|
|
||||||
env.addReporter({
|
env.addReporter({
|
||||||
specDone: specDone,
|
specDone: specDone,
|
||||||
@@ -161,9 +162,15 @@ describe("Env integration", function() {
|
|||||||
})]
|
})]
|
||||||
}));
|
}));
|
||||||
expect(specDone).toHaveBeenCalledWith(jasmine.objectContaining({
|
expect(specDone).toHaveBeenCalledWith(jasmine.objectContaining({
|
||||||
description: 'has a message from an Error',
|
description: 'has a message and stack trace from an Error',
|
||||||
failedExpectations: [jasmine.objectContaining({
|
failedExpectations: [jasmine.objectContaining({
|
||||||
message: 'Failed: error message'
|
message: 'Failed: error message',
|
||||||
|
stack: {
|
||||||
|
asymmetricMatch: function(other) {
|
||||||
|
var firstLine = other.split('\n')[1];
|
||||||
|
return firstLine.indexOf('EnvSpec') >= 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
})]
|
})]
|
||||||
}));
|
}));
|
||||||
done();
|
done();
|
||||||
@@ -179,8 +186,8 @@ describe("Env integration", function() {
|
|||||||
env.fail('messy message');
|
env.fail('messy message');
|
||||||
});
|
});
|
||||||
|
|
||||||
env.it('has a message from an Error', function() {
|
env.it('has a message and stack trace from an Error', function() {
|
||||||
env.fail(new Error('error message'));
|
env.fail(errorObj);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@@ -445,7 +445,8 @@ getJasmineRequireObj().Env = function(j$) {
|
|||||||
passed: false,
|
passed: false,
|
||||||
expected: '',
|
expected: '',
|
||||||
actual: '',
|
actual: '',
|
||||||
message: message
|
message: message,
|
||||||
|
error: error && error.message ? error : null
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user