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,4 @@
getJasmineRequireObj().ObjectContaining = function(j$) {
function ObjectContaining(sample) {
this.sample = sample;
}
@@ -17,7 +16,7 @@ getJasmineRequireObj().ObjectContaining = function(j$) {
}
function hasProperty(obj, property) {
if (!obj || typeof(obj) !== 'object') {
if (!obj || typeof obj !== 'object') {
return false;
}
@@ -29,12 +28,22 @@ getJasmineRequireObj().ObjectContaining = function(j$) {
}
ObjectContaining.prototype.asymmetricMatch = function(other, matchersUtil) {
if (typeof(this.sample) !== 'object') { throw new Error('You must provide an object to objectContaining, not \''+this.sample+'\'.'); }
if (typeof(other) !== 'object') { return false; }
if (typeof this.sample !== 'object') {
throw new Error(
"You must provide an object to objectContaining, not '" +
this.sample +
"'."
);
}
if (typeof other !== 'object') {
return false;
}
for (var property in this.sample) {
if (!hasProperty(other, property) ||
!matchersUtil.equals(this.sample[property], other[property])) {
if (
!hasProperty(other, property) ||
!matchersUtil.equals(this.sample[property], other[property])
) {
return false;
}
}
@@ -51,7 +60,7 @@ getJasmineRequireObj().ObjectContaining = function(j$) {
}
var filteredOther = {};
Object.keys(this.sample).forEach(function (k) {
Object.keys(this.sample).forEach(function(k) {
// eq short-circuits comparison of objects that have different key sets,
// so include all keys even if undefined.
filteredOther[k] = other[k];