add prettier and eslint

This commit is contained in:
Gregg Van Hove
2019-05-21 17:44:38 -07:00
parent cf2c5c9acc
commit b4cbe9850f
90 changed files with 6345 additions and 3647 deletions

View File

@@ -1,6 +1,8 @@
getJasmineRequireObj().Expectation = function(j$) {
var promiseForMessage = {
jasmineToString: function() { return 'a promise'; }
jasmineToString: function() {
return 'a promise';
}
};
/**
@@ -12,7 +14,10 @@ getJasmineRequireObj().Expectation = function(j$) {
var customMatchers = options.customMatchers || {};
for (var matcherName in customMatchers) {
this[matcherName] = wrapSyncCompare(matcherName, customMatchers[matcherName]);
this[matcherName] = wrapSyncCompare(
matcherName,
customMatchers[matcherName]
);
}
}
@@ -50,7 +55,9 @@ getJasmineRequireObj().Expectation = function(j$) {
this.expector = new j$.Expector(options);
if (!global.Promise) {
throw new Error('expectAsync is unavailable because the environment does not support promises.');
throw new Error(
'expectAsync is unavailable because the environment does not support promises.'
);
}
if (!j$.isPromiseLike(this.expector.actual)) {
@@ -100,9 +107,11 @@ getJasmineRequireObj().Expectation = function(j$) {
// frames that are relevant to the user instead of just parts of Jasmine.
var errorForStack = j$.util.errorWithStack();
return this.expector.compare(name, matcherFactory, arguments).then(function(result) {
self.expector.processResult(result, errorForStack, promiseForMessage);
});
return this.expector
.compare(name, matcherFactory, arguments)
.then(function(result) {
self.expector.processResult(result, errorForStack, promiseForMessage);
});
};
}