Skip to content

Commit 9f7948c

Browse files
committed
Fix linting
1 parent a20120a commit 9f7948c

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/events.test.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ each(EVENTS, ({ title }, eventName) => {
1616
t.false(onError.called)
1717
await emit(eventName)
1818
t.is(onError.callCount, getCallCount(eventName))
19-
const [error, event] = onError.args[onError.args.length - 1]
19+
const [error, event] = onError.args.at(-1)
2020
t.true(error instanceof Error)
2121
t.is(event, eventName)
2222

@@ -55,7 +55,7 @@ each(EVENTS, ({ title }, eventName) => {
5555
t.false(consoleStub.called)
5656
await emit(eventName)
5757
t.is(consoleStub.callCount, getCallCount(eventName))
58-
t.true(consoleStub.args[consoleStub.args.length - 1][0] instanceof Error)
58+
t.true(consoleStub.args.at(-1)[0] instanceof Error)
5959

6060
stopLogging()
6161
consoleStub.reset()

src/limit.test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ each(EVENTS, ({ title }, eventName) => {
3636
const { onError, stopLogging } = startLogging()
3737

3838
await emitManyValues(getRandomStackError, eventName, MAX_EVENTS + 1)
39-
t.is(onError.args[onError.args.length - 1][1], 'warning')
39+
t.is(onError.args.at(-1)[1], 'warning')
4040

4141
stopLogging()
4242
})

0 commit comments

Comments
 (0)