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:
Steve Gravrock
2026-03-10 20:02:42 -07:00
parent 03ebebf6fb
commit 434575f49d
88 changed files with 3650 additions and 3604 deletions

View File

@@ -137,20 +137,20 @@ describe('JsApiReporter', function() {
describe('#executionTime', function() {
it('should start the timer when jasmine starts', function() {
const timerSpy = jasmine.createSpyObj('timer', ['start', 'elapsed']),
reporter = new privateUnderTest.JsApiReporter({
timer: timerSpy
});
const timerSpy = jasmine.createSpyObj('timer', ['start', 'elapsed']);
const reporter = new privateUnderTest.JsApiReporter({
timer: timerSpy
});
reporter.jasmineStarted();
expect(timerSpy.start).toHaveBeenCalled();
});
it('should return the time it took the specs to run, in ms', function() {
const timerSpy = jasmine.createSpyObj('timer', ['start', 'elapsed']),
reporter = new privateUnderTest.JsApiReporter({
timer: timerSpy
});
const timerSpy = jasmine.createSpyObj('timer', ['start', 'elapsed']);
const reporter = new privateUnderTest.JsApiReporter({
timer: timerSpy
});
timerSpy.elapsed.and.returnValue(1000);
reporter.jasmineDone();
@@ -159,10 +159,10 @@ describe('JsApiReporter', function() {
describe("when the specs haven't finished being run", function() {
it('should return undefined', function() {
const timerSpy = jasmine.createSpyObj('timer', ['start', 'elapsed']),
reporter = new privateUnderTest.JsApiReporter({
timer: timerSpy
});
const timerSpy = jasmine.createSpyObj('timer', ['start', 'elapsed']);
const reporter = new privateUnderTest.JsApiReporter({
timer: timerSpy
});
expect(reporter.executionTime()).toBeUndefined();
});