projen / projen

Rapidly build modern applications with advanced configuration management
https://projen.io
Apache License 2.0
2.65k stars 372 forks source link

Switching `jest: true` -> `false` does not remove jest.config.js #2404

Closed rix0rrr closed 1 year ago

rix0rrr commented 1 year ago

This file is fully managed by projen, so it can be removed after I decide I don't need jest support anymore.

fynnfluegge commented 1 year ago

@rix0rrr how did you detect this bug? I tested several .projenrc.js configurations and in all cases the jest.config.ts gets deleted.

When synth with

const project = new typescript.TypeScriptProject({
  defaultReleaseBranch: 'main',
  name: 'projen-test',
  jest: true,
  jestOptions: {
    testEnvironment: 'node',
    automock: false,
    configFilePath: 'jest.config.js',
  },
});

and afterwards setting jest: false but keep jestOptions and synth again the file gets deleted. Even when configFilePath differs from jest.config.ts it gets deleted.

mrgrain commented 1 year ago

Can't reproduce this either. Closing for now.