-
Notifications
You must be signed in to change notification settings - Fork 80
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: refine promise usages in smart coffee machine scripts #337
feat: refine promise usages in smart coffee machine scripts #337
Conversation
Part of eclipse-thingweb#331 Signed-off-by: fatadel <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am more in favor of nesting code with if/else so that I can be sure that a resolve
or reject
is the last possible command executed.
However if you want to keep your code style I suggest adding a return
statement after resolve
/reject
if yet another resolve
/reject
can follow.
see https://stackoverflow.com/questions/32536049/do-i-need-to-return-after-early-resolve-reject
Part of eclipse-thingweb#331 Signed-off-by: fatadel <[email protected]>
Done! |
packages/core/test/ServerTest.ts
Outdated
@@ -612,6 +612,48 @@ class WoTServerTest { | |||
expect(thing).to.have.property("@context").to.deep.include({"@language": "xx"}); | |||
} | |||
|
|||
@test async "should reject reading property without uriVariables when they are mandatory"() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you @fatadel . You are right this is really an issue.
I will fix it in another PR to better keep track.
May I ask you to remove the test case in this pr. Sorry indeed and thanks!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure, no worries!
Signed-off-by: fatadel <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would prefer to keep it as it is. |
Makes sense to me since we now have both possibilities in the examples directory (the counter uses async-await on request, see #335) |
Part of #331
Signed-off-by: fatadel [email protected]