From 2a72c4a5a2c64fdbdd87e1e61021ecb0b6dedeb6 Mon Sep 17 00:00:00 2001 From: mrkvon Date: Sun, 16 Dec 2018 15:13:35 +0100 Subject: [PATCH] comment: explain await null --- .../client/ReferencesNew.client.component.tests.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/modules/references/tests/client/ReferencesNew.client.component.tests.js b/modules/references/tests/client/ReferencesNew.client.component.tests.js index 89f3213fd1..c5150c1cef 100644 --- a/modules/references/tests/client/ReferencesNew.client.component.tests.js +++ b/modules/references/tests/client/ReferencesNew.client.component.tests.js @@ -63,7 +63,7 @@ Enzyme.configure({ adapter: new Adapter() }); const wrapper = shallow(); expect(wrapper.find(Duplicate)).not.toExist(); - await null; + await null; // wait for the next tick (resolve stubbed API call) expect(wrapper.find(Duplicate)).toExist(); expect(wrapper.find(Interaction)).not.toExist(); }); @@ -76,7 +76,7 @@ Enzyme.configure({ adapter: new Adapter() }); const wrapper = shallow(); expect(wrapper.find(Interaction)).not.toExist(); - await null; + await null; // wait for the next tick (resolve stubbed API call) expect(wrapper.find(Interaction)).toExist(); }); @@ -89,7 +89,7 @@ Enzyme.configure({ adapter: new Adapter() }); const wrapper = shallow(); - await null; + await null; // wait for the next tick (resolve stubbed API call) expect(spyCreate.callCount).toBe(0); wrapper.setState({ @@ -124,7 +124,7 @@ Enzyme.configure({ adapter: new Adapter() }); const wrapper = shallow(); - await null; + await null; // wait for the next tick (resolve stubbed API call) expect(spyReport.callCount).toBe(0); wrapper.setState({ @@ -140,7 +140,7 @@ Enzyme.configure({ adapter: new Adapter() }); nav.props().onSubmit(); - await null; + await null; // wait for the next tick (resolve stubbed API call) expect(spyReport.callCount).toBe(0); @@ -153,7 +153,7 @@ Enzyme.configure({ adapter: new Adapter() }); nav.props().onSubmit(); - await null; + await null; // wait for the next tick (resolve stubbed API call) expect(spyReport.callCount).toBe(1); expect(spyReport.calledOnceWith(userTo, 'asdf')).toBe(true);