Run Prettier on all files
This commit is contained in:
@@ -1,5 +1,8 @@
|
||||
getJasmineRequireObj().toThrowMatching = function(j$) {
|
||||
var usageError = j$.formatErrorMsg('<toThrowMatching>', 'expect(function() {<expectation>}).toThrowMatching(<Predicate>)');
|
||||
var usageError = j$.formatErrorMsg(
|
||||
'<toThrowMatching>',
|
||||
'expect(function() {<expectation>}).toThrowMatching(<Predicate>)'
|
||||
);
|
||||
|
||||
/**
|
||||
* {@link expect} a function to `throw` something matching a predicate.
|
||||
@@ -31,20 +34,29 @@ getJasmineRequireObj().toThrowMatching = function(j$) {
|
||||
}
|
||||
|
||||
if (predicate(thrown)) {
|
||||
return pass('Expected function not to throw an exception matching a predicate.');
|
||||
return pass(
|
||||
'Expected function not to throw an exception matching a predicate.'
|
||||
);
|
||||
} else {
|
||||
return fail(function() {
|
||||
return 'Expected function to throw an exception matching a predicate, ' +
|
||||
'but it threw ' + thrownDescription(thrown) + '.';
|
||||
});
|
||||
return fail(function() {
|
||||
return (
|
||||
'Expected function to throw an exception matching a predicate, ' +
|
||||
'but it threw ' +
|
||||
thrownDescription(thrown) +
|
||||
'.'
|
||||
);
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
function thrownDescription(thrown) {
|
||||
if (thrown && thrown.constructor) {
|
||||
return j$.fnNameFor(thrown.constructor) + ' with message ' +
|
||||
matchersUtil.pp(thrown.message);
|
||||
return (
|
||||
j$.fnNameFor(thrown.constructor) +
|
||||
' with message ' +
|
||||
matchersUtil.pp(thrown.message)
|
||||
);
|
||||
} else {
|
||||
return matchersUtil.pp(thrown);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user