You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I think it will run consecutively more or less as you have it. await causes a wait until the instruction's Promise is resolved, so the assert statement won't start until registerUser has resolved.
For clarity, I'd suggest putting the second await statement in a statement of its own, like this: await meetupBaseInstance.registerUser("BokkyPooBah", {from: organiser}); const result=await meetupBaseInstance.users.call({ from:organiser }); assert.equal(result[0], "BokkyPooBah");
Note that I've also changed the syntax a little from the original example. It looks more correct to me.
I need to run these two commands consecutively. How do I make sure it happens in order?
it('can register BokkyPooBah', async () => { await meetupBaseInstance.registerUser("BokkyPooBah", {from: organiser}); assert.equal(await meetupBaseInstance.users.call("BokkyPooBah"), organiser); });
The text was updated successfully, but these errors were encountered: