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
@@ -1,5 +1,5 @@
getJasmineRequireObj().toHaveBeenCalledOnceWith = function(j$) {
var getErrorMsg = j$.formatErrorMsg(
const getErrorMsg = j$.formatErrorMsg(
'<toHaveBeenCalledOnceWith>',
'expect(<spyObj>).toHaveBeenCalledOnceWith(...arguments)'
);
@@ -16,7 +16,7 @@ getJasmineRequireObj().toHaveBeenCalledOnceWith = function(j$) {
function toHaveBeenCalledOnceWith(util) {
return {
compare: function() {
var args = Array.prototype.slice.call(arguments, 0),
const args = Array.prototype.slice.call(arguments, 0),
actual = args[0],
expectedArgs = args.slice(1);
@@ -26,7 +26,7 @@ getJasmineRequireObj().toHaveBeenCalledOnceWith = function(j$) {
);
}
var prettyPrintedCalls = actual.calls
const prettyPrintedCalls = actual.calls
.allArgs()
.map(function(argsForCall) {
return ' ' + util.pp(argsForCall);
@@ -53,7 +53,7 @@ getJasmineRequireObj().toHaveBeenCalledOnceWith = function(j$) {
function getDiffs() {
return actual.calls.allArgs().map(function(argsForCall, callIx) {
var diffBuilder = new j$.DiffBuilder();
const diffBuilder = new j$.DiffBuilder();
util.equals(argsForCall, expectedArgs, diffBuilder);
return diffBuilder.getMessage();
});