Run Prettier on all files

This commit is contained in:
Steve Gravrock
2020-09-29 18:05:38 -07:00
parent 7d5ca27b9d
commit d27bb8fa96
108 changed files with 4399 additions and 2926 deletions

View File

@@ -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);
}