Replaced uses of var with const/let

This commit is contained in:
Steve Gravrock
2022-06-08 19:07:43 -07:00
parent 4af86f5398
commit 135ff20123
73 changed files with 1384 additions and 1391 deletions

View File

@@ -1,5 +1,5 @@
getJasmineRequireObj().toThrowMatching = function(j$) {
var usageError = j$.formatErrorMsg(
const usageError = j$.formatErrorMsg(
'<toThrowMatching>',
'expect(function() {<expectation>}).toThrowMatching(<Predicate>)'
);
@@ -16,8 +16,6 @@ getJasmineRequireObj().toThrowMatching = function(j$) {
function toThrowMatching(matchersUtil) {
return {
compare: function(actual, predicate) {
var thrown;
if (typeof actual !== 'function') {
throw new Error(usageError('Actual is not a Function'));
}
@@ -26,6 +24,8 @@ getJasmineRequireObj().toThrowMatching = function(j$) {
throw new Error(usageError('Predicate is not a Function'));
}
let thrown;
try {
actual();
return fail('Expected function to throw an exception.');