Skip to content

Commit a080463

Browse files
committed
Fix async test
1 parent 5f5b314 commit a080463

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

test/BranchSubscriber.test.js

+1-7
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ test('will return a cached event when appropriate', done => {
100100
subscriber.subscribe()
101101
})
102102

103-
test('passes a non-null uri to onOpenStart when available', () => {
103+
test('passes a non-null uri to onOpenStart when available', done => {
104104
const mockResult = {
105105
params: {
106106
'+clicked_branch_link': true,
@@ -120,13 +120,7 @@ test('passes a non-null uri to onOpenStart when available', () => {
120120
})
121121

122122
// mock subscriber._nativeEventEmitter.addListener.
123-
124-
// TODO: Brittle test
125-
// Expect first onOpenStart, then onOpenComplete, then _nativeEventEmitter.addListener three times,
126-
// with INIT_SESSION_ERROR last.
127123
subscriber._nativeEventEmitter.addListener = (eventType, listener) => {
128-
if (eventType !== RNBranch.INIT_SESSION_ERROR) return
129-
130124
// --- Check results ---
131125

132126
// Expect onOpenStart to be called

0 commit comments

Comments
 (0)