Skip to content
This repository has been archived by the owner on Jul 28, 2020. It is now read-only.

You cannot wait and event without a timeout #96

Closed
antoinereyt opened this issue Oct 25, 2019 · 2 comments
Closed

You cannot wait and event without a timeout #96

antoinereyt opened this issue Oct 25, 2019 · 2 comments
Assignees

Comments

@antoinereyt
Copy link
Contributor

This works:

yield this.wait.event("UserActivatedEvent").for(30);

BUT, If I do this:

yield this.wait.event("UserActivatedEvent");

I run into this:
Screen Shot 2019-10-25 at 16 42 38

The full stacktrace:

Error: "Wait {
	eventName: 'UserActivatedEvent',
	timestamp: null,
	duration: null
}" behind "yield" is not valid instruction - check Zenaton syntax
    at Branch._checkYieldValue (/Users/antoine/.zenaton/lib/worker-0.8.3/priv/javascript/lib/Code/yield/Decider/Branch.js:114:23)
    at Branch.run (/Users/antoine/.zenaton/lib/worker-0.8.3/priv/javascript/lib/Code/yield/Decider/Branch.js:79:12)
    at _callee$ (/Users/antoine/.zenaton/lib/worker-0.8.3/priv/javascript/lib/Code/yield/Decider/Decider.js:40:33)
    at tryCatch (/Users/antoine/.zenaton/lib/worker-0.8.3/priv/javascript/node_modules/regenerator-runtime/runtime.js:45:40)
    at Generator.invoke [as _invoke] (/Users/antoine/.zenaton/lib/worker-0.8.3/priv/javascript/node_modules/regenerator-runtime/runtime.js:271:22)
    at Generator.prototype.(anonymous function) [as next] (/Users/antoine/.zenaton/lib/worker-0.8.3/priv/javascript/node_modules/regenerator-runtime/runtime.js:97:21)
    at asyncGeneratorStep (/Users/antoine/.zenaton/lib/worker-0.8.3/priv/javascript/node_modules/@babel/runtime/helpers/asyncToGenerator.js:3:24)
    at _next (/Users/antoine/.zenaton/lib/worker-0.8.3/priv/javascript/node_modules/@babel/runtime/helpers/asyncToGenerator.js:25:9)
    at <anonymous>
    at process._tickDomainCallback (internal/process/next_tick.js:229:7)
@geomagilles
Copy link
Contributor

geomagilles commented Oct 25, 2019

The syntax is:

yield this.wait.event("UserActivatedEvent").forever();

Make sure the documentation reflects that @antoinereyt

@antoinereyt
Copy link
Contributor Author

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants