Skip to content

Commit 0a1bad6

Browse files
committed
Fix code duplication
1 parent 9249788 commit 0a1bad6

File tree

1 file changed

+2
-1
lines changed
  • test/helpers/testing/jasmine

1 file changed

+2
-1
lines changed

test/helpers/testing/jasmine/main.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@ const { eventName } = getOptions()
66

77
describe('should make tests fail', () => {
88
it(`on ${eventName}`, () => {
9+
const promise = EVENTS_MAP[eventName].emit()
910
// eslint-disable-next-line no-empty-function, max-nested-callbacks
10-
EVENTS_MAP[eventName].emit().catch(() => {})
11+
promise.catch(() => {})
1112
})
1213
})

0 commit comments

Comments
 (0)