| | |
| | | Object.defineProperty(exports, '__esModule', { |
| | | value: true |
| | | }); |
| | | exports.default = void 0; |
| | | exports.default = init; |
| | | |
| | | function path() { |
| | | const data = _interopRequireWildcard(require('path')); |
| | |
| | | |
| | | const getConfigFilename = ext => JEST_CONFIG_BASE_NAME + ext; |
| | | |
| | | var _default = async ( |
| | | rootDir = (0, _jestUtil().tryRealpath)(process.cwd()) |
| | | ) => { |
| | | async function init(rootDir = (0, _jestUtil().tryRealpath)(process.cwd())) { |
| | | // prerequisite checks |
| | | const projectPackageJsonPath = path().join(rootDir, PACKAGE_JSON); |
| | | |
| | |
| | | console.log(); |
| | | console.log( |
| | | _chalk().default.underline( |
| | | `The following questions will help Jest to create a suitable configuration for your project\n` |
| | | 'The following questions will help Jest to create a suitable configuration for your project\n' |
| | | ) |
| | | ); |
| | | let promptAborted = false; // @ts-expect-error: Return type cannot be object - faulty typings |
| | |
| | | console.log( |
| | | `📝 Configuration file created at ${_chalk().default.cyan(jestConfigPath)}` |
| | | ); |
| | | }; |
| | | |
| | | exports.default = _default; |
| | | } |