Merge branch 'feat/improveErrorMessages' of https://github.com/dhoko/jasmine into dhoko-feat/improveErrorMessages

- Merges #1026 from @dhoko
- Fixes #1025
This commit is contained in:
slackersoft
2016-03-18 10:40:44 -07:00
16 changed files with 72 additions and 28 deletions

View File

@@ -1,5 +1,7 @@
getJasmineRequireObj().toThrow = function(j$) {
var getErrorMsg = j$.formatErrorMsg('<toThrow>', 'expect(function() {<expectation>}).toThrow()');
function toThrow(util) {
return {
compare: function(actual, expected) {
@@ -8,7 +10,7 @@ getJasmineRequireObj().toThrow = function(j$) {
thrown;
if (typeof actual != 'function') {
throw new Error('Actual is not a Function');
throw new Error(getErrorMsg('Actual is not a Function'));
}
try {