I have the below folder structure in cypress. I am trying to call object repo and test data json files in BDD step definition, but it won't pick the files.
I have the below functions in command.js file
Earlier i was calling using the below code in my .cy.js file but the same code is not working with BDD




It seems like you have used
When('login...', () => {instead ofWhen('login...', function() {since error message saysthisis undefined.But maybe you already tried that and
When()does not support Mochathisscope (sinceWhen()is a wrapper overit()).There are alternatives:
explicitly retrieve the alias value
use
requireto get fixtures