( projectConfig: Config.ProjectConfig, )
| 369 | } |
| 370 | |
| 371 | function readGlobalsCleanupConfig( |
| 372 | projectConfig: Config.ProjectConfig, |
| 373 | ): DeletionMode { |
| 374 | const rawConfig = projectConfig.testEnvironmentOptions.globalsCleanup; |
| 375 | const config = rawConfig?.toString()?.toLowerCase(); |
| 376 | switch (config) { |
| 377 | case 'off': |
| 378 | case 'on': |
| 379 | case 'soft': |
| 380 | return config; |
| 381 | default: { |
| 382 | if (config !== undefined) { |
| 383 | logValidationWarning( |
| 384 | 'testEnvironmentOptions.globalsCleanup', |
| 385 | `Unknown value given: ${rawConfig}`, |
| 386 | 'Available options are: [on, soft, off]', |
| 387 | ); |
| 388 | } |
| 389 | return 'soft'; |
| 390 | } |
| 391 | } |
| 392 | } |
no test coverage detected