Skip to content

Commit 59f2347

Browse files
committed
immediate
1 parent 0119f47 commit 59f2347

File tree

2 files changed

+7
-5
lines changed

2 files changed

+7
-5
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,4 +39,4 @@
3939
"react": "^16.8.6",
4040
"react-dom": "^16.8.6"
4141
}
42-
}
42+
}

src/App.spec.js

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -104,12 +104,14 @@ describe('App', () => {
104104
expect(wrapper.find('li').length).toEqual(0);
105105

106106
promise.then(() => {
107-
wrapper.update();
108-
expect(wrapper.find('li').length).toEqual(2);
107+
setImmediate(() => {
108+
wrapper.update();
109+
expect(wrapper.find('li').length).toEqual(2);
109110

110-
axios.get.mockClear();
111+
axios.get.mockClear();
111112

112-
done();
113+
done();
114+
});
113115
});
114116
});
115117

0 commit comments

Comments
 (0)