Open penchef opened 2 years ago
Ran into this little issue:
When:
const testUsers = [ { username: 'Foo', testFeatureFoo: true, }, { username: 'Bar', }, ]; testUsers.forEach( (user) => { onlyOn(user.testFeatureFoo, () => { // <<<<<<<<<<<<<<<<<<<<<<< it('testingFoo', () => { ... }); }); });
Then: it results into
The following error originated from your test code, not from Cypress. > Invalid syntax: cy.onlyOn(<name>), for example cy.onlyOn("linux")
However this works:
const testUsers = [ { username: 'Foo', testFeatureFoo: true, }, { username: 'Bar', }, ]; testUsers.forEach( (user) => { onlyOn(user.testFeatureFoo === true, () => { // <<<<<<<<<<<<<<<<<<<<< alternativly: !!user.testFeatureFoo it('testingFoo', () => { ... }); }); });
Ran into this little issue:
When:
Then: it results into
However this works: