Files to save as *.test.js


I’ve changed the path in codecept.conf.js to save files in a given folder as name.test.js.

exports.config = {
    tests: './tests/AT/*.test.js',
    output: './output',

When I create a new file with codeceptjs gt command, it creates the file in AT folder, but as _test.js

Any idea how to overwrite it so it works?

I’ve tried:

  • escaping it with regex: tests: ‘./tests/AT/*.test.js’,
  • overwriting defaultConfig in node_modules/codeceptjs/lib/command/init
  • overwriting defaultExt in node_modules/codeceptjs/lib/command/generate

Sadly none of the above works.

it is like this in the source code

const defaultExt = config.tests.match(/([^\*/]*?)$/[1])[0] || '_test.js';

Hi, I’ve changed the ‘_test.js’ to ‘.test.js’ but a new file was still x_test.js