-
Notifications
You must be signed in to change notification settings - Fork 21
refactor: remove async module #100
refactor: remove async module #100
Conversation
Update samples to use async/await. Uptate main system tests to use async/await and callback versions.
7fc4f7a
to
6ad4594
Compare
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.
This is just a little hard to review, but if the system and sample tests all pass, LGTM :)
system-test/test.ts
Outdated
const images = is as ImageMap; | ||
assert.ifError(err); | ||
it('should get only the latest image from every OS', async () => { | ||
try { |
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.
No need to do the try/catch here, it'll just fail if it throws :)
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.
True, thanks, done.
system-test/test.ts
Outdated
}); | ||
assert(image.selfLink.indexOf(osName) > -1); | ||
} catch (err) { | ||
assert.ifError(err); |
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.
same here, you can just drop this
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.
Done
Towards googleapis/google-cloud-node/issues/2883
async
andpify
modules.chai
forassert
s.async
first with callbackification support rather than usingpromisifyAll
.