Skip to content

using pactum in a class method returns a promise #185

Answered by ASaiAnudeep
AndyB-Test asked this question in Q&A
Discussion options

You must be logged in to vote

The method getUuid returns the result of getInfo function which is a promise. So we need to put an await statement before the function call.

console.log(await this.apiHandler.getUuid('name'))

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@AndyB-Test
Comment options

Answer selected by ASaiAnudeep
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants