Use one declaration per statement
The old style of merging all of a function's variable declarations into a single statement made some sense back in the days of var, but there's no reason to keep doing it now that we use const and let.
This commit is contained in:
@@ -86,16 +86,16 @@ describe('Custom Async Matchers (Integration)', function() {
|
||||
|
||||
it('passes the jasmine utility to the matcher factory', async function() {
|
||||
const matcherFactory = function() {
|
||||
return {
|
||||
compare: function() {
|
||||
return Promise.resolve({ pass: true });
|
||||
}
|
||||
};
|
||||
},
|
||||
matcherFactorySpy = jasmine.createSpy(
|
||||
'matcherFactorySpy',
|
||||
matcherFactory
|
||||
);
|
||||
return {
|
||||
compare: function() {
|
||||
return Promise.resolve({ pass: true });
|
||||
}
|
||||
};
|
||||
};
|
||||
const matcherFactorySpy = jasmine.createSpy(
|
||||
'matcherFactorySpy',
|
||||
matcherFactory
|
||||
);
|
||||
|
||||
env.it('spec with expectation', function() {
|
||||
env.addAsyncMatchers({
|
||||
@@ -117,19 +117,19 @@ describe('Custom Async Matchers (Integration)', function() {
|
||||
|
||||
it('provides custom equality testers to the matcher factory via matchersUtil', async function() {
|
||||
const matcherFactory = function(matchersUtil) {
|
||||
return {
|
||||
compare: function(actual, expected) {
|
||||
return Promise.resolve({
|
||||
pass: matchersUtil.equals(actual[0], expected)
|
||||
});
|
||||
}
|
||||
};
|
||||
},
|
||||
customEqualityFn = jasmine
|
||||
.createSpy('customEqualityFn')
|
||||
.and.callFake(function(a, b) {
|
||||
return a.toString() === b;
|
||||
});
|
||||
return {
|
||||
compare: function(actual, expected) {
|
||||
return Promise.resolve({
|
||||
pass: matchersUtil.equals(actual[0], expected)
|
||||
});
|
||||
}
|
||||
};
|
||||
};
|
||||
const customEqualityFn = jasmine
|
||||
.createSpy('customEqualityFn')
|
||||
.and.callFake(function(a, b) {
|
||||
return a.toString() === b;
|
||||
});
|
||||
|
||||
env.it('spec with expectation', function() {
|
||||
env.addCustomEqualityTester(customEqualityFn);
|
||||
|
||||
Reference in New Issue
Block a user