This is a minimal reproduction for an incompatibility between
@badeball/cypress-cucumber-preprocessor and @cypress/grep burn mode.
The project has one .feature file with three scenarios. The reproduction
greps only the last scenario and asks @cypress/grep to burn it four times.
With Badeball 24.0.1, the fourth burn iteration fails because Badeball keeps
a finite FIFO of included pickles and shifts it after each Mocha test. Burn mode
creates multiple Mocha tests for one Cucumber pickle, so the queue is exhausted
before the final burn iteration.
The dependency versions are based on the application where the failure was
first observed, with @cypress/grep upgraded to 6.0.0:
{
"@badeball/cypress-cucumber-preprocessor": "24.0.1",
"@bahmutov/cypress-esbuild-preprocessor": "2.2.2",
"@cypress/grep": "6.0.0",
"cypress": "15.15.0",
"esbuild": "0.27.0",
"typescript": "5.9.3"
}Install dependencies:
npm installRun Cypress:
npm run reproduceEquivalent direct command:
npx cypress run --expose grep="burn target",burn=4,grepOmitFiltered=trueAll four burn iterations of the burn target scenario pass.
The first three burn iterations pass. The fourth iteration fails before the step body runs in Badeball's browser runtime:
Burn compatibility
✓ burn target: burning 1 of 4
✓ burn target: burning 2 of 4
✓ burn target: burning 3 of 4
1) burn target: burning 4 of 4
TypeError: Cannot read properties of undefined (reading 'id')
In larger feature files the same failure appears at burn iteration
number of scenarios in the feature + 1.