The approach I figure out is this
Given(
`Step1`,
async function() {
const IwantToUseThisObj = {
A: 'a',
B: 'b'
}
this.IwantToUseThisObj = IwantToUseThisObj
}
)
Then(`Step2`, async function() {
IwantToUseThisObj = this.IwantToUseThisObj
})
but I am not sure it's the best practice or not, and if I need to use it a lot of time it looks very repetitive,
any better approach? I just want to use the value I use from the Given step