Mocha error in new codeceptjs 3.0

install latest codecept 3.0.0

generate test:
Feature(‘giraffe’);

Scenario(‘test something’, ({ I }) => {

});
try running it - you get an error:
npx codeceptjs run giraffe_test.js
TypeError: Cannot set property id of # which has only a getter
at C:\Users\jonpye\vsproj\newproj\node_modules\codeceptjs\lib\mochaFactory.js:53:46
at Array.forEach ()
at Suite.eachTest (C:\Users\jonpye\vsproj\newproj\node_modules\mocha\lib\suite.js:438:14)
at C:\Users\jonpye\vsproj\newproj\node_modules\mocha\lib\suite.js:440:11
at Array.forEach ()
at Suite.eachTest (C:\Users\jonpye\vsproj\newproj\node_modules\mocha\lib\suite.js:439:15)
at Mocha.mocha.loadFiles (C:\Users\jonpye\vsproj\newproj\node_modules\codeceptjs\lib\mochaFactory.js:53:21)
at Mocha.run (C:\Users\jonpye\vsproj\newproj\node_modules\mocha\lib\mocha.js:970:10)
at C:\Users\jonpye\vsproj\newproj\node_modules\codeceptjs\lib\codecept.js:170:15
at new Promise ()

Cannot set property id of # which has only a getter

Codeceptjs v3.0.1 should fix your issue.

1 Like