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:
@@ -15,16 +15,16 @@ describe('toBePositiveInfinity', function() {
|
||||
|
||||
it('has a custom message on failure', function() {
|
||||
const matcher = privateUnderTest.matchers.toBePositiveInfinity({
|
||||
pp: privateUnderTest.makePrettyPrinter()
|
||||
}),
|
||||
result = matcher.compare(0);
|
||||
pp: privateUnderTest.makePrettyPrinter()
|
||||
});
|
||||
const result = matcher.compare(0);
|
||||
|
||||
expect(result.message()).toEqual('Expected 0 to be Infinity.');
|
||||
});
|
||||
|
||||
it('succeeds for Infinity', function() {
|
||||
const matcher = privateUnderTest.matchers.toBePositiveInfinity(),
|
||||
result = matcher.compare(Number.POSITIVE_INFINITY);
|
||||
const matcher = privateUnderTest.matchers.toBePositiveInfinity();
|
||||
const result = matcher.compare(Number.POSITIVE_INFINITY);
|
||||
|
||||
expect(result.pass).toBe(true);
|
||||
expect(result.message).toEqual('Expected actual not to be Infinity.');
|
||||
|
||||
Reference in New Issue
Block a user