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().toBeInstanceOf = function(j$) {
var usageError = j$.formatErrorMsg('<toBeInstanceOf>', 'expect(value).toBeInstanceOf(<ConstructorFunction>)');
var usageError = j$.formatErrorMsg(
'<toBeInstanceOf>',
'expect(value).toBeInstanceOf(<ConstructorFunction>)'
);
/**
* {@link expect} the actual to be an instance of the expected class
@@ -15,27 +18,42 @@ getJasmineRequireObj().toBeInstanceOf = function(j$) {
function toBeInstanceOf(matchersUtil) {
return {
compare: function(actual, expected) {
var actualType = actual && actual.constructor ? j$.fnNameFor(actual.constructor) : matchersUtil.pp(actual),
expectedType = expected ? j$.fnNameFor(expected) : matchersUtil.pp(expected),
expectedMatcher,
pass;
var actualType =
actual && actual.constructor
? j$.fnNameFor(actual.constructor)
: matchersUtil.pp(actual),
expectedType = expected
? j$.fnNameFor(expected)
: matchersUtil.pp(expected),
expectedMatcher,
pass;
try {
expectedMatcher = new j$.Any(expected);
pass = expectedMatcher.asymmetricMatch(actual);
expectedMatcher = new j$.Any(expected);
pass = expectedMatcher.asymmetricMatch(actual);
} catch (error) {
throw new Error(usageError('Expected value is not a constructor function'));
throw new Error(
usageError('Expected value is not a constructor function')
);
}
if (pass) {
return {
pass: true,
message: 'Expected instance of ' + actualType + ' not to be an instance of ' + expectedType
message:
'Expected instance of ' +
actualType +
' not to be an instance of ' +
expectedType
};
} else {
return {
pass: false,
message: 'Expected instance of ' + actualType + ' to be an instance of ' + expectedType
message:
'Expected instance of ' +
actualType +
' to be an instance of ' +
expectedType
};
}
}