From 1df2848470aa9d0d12096e43853d6f22046fe5a5 Mon Sep 17 00:00:00 2001 From: Simen Bekkhus Date: Thu, 10 Feb 2022 14:15:31 +0100 Subject: [PATCH] fix yargs in repl as well --- packages/jest-repl/src/__tests__/jest_repl.test.js | 2 +- packages/jest-repl/src/cli/args.ts | 5 ----- packages/jest-repl/src/cli/index.ts | 2 +- 3 files changed, 2 insertions(+), 7 deletions(-) diff --git a/packages/jest-repl/src/__tests__/jest_repl.test.js b/packages/jest-repl/src/__tests__/jest_repl.test.js index 943ac20bdc38..b86932a89b0e 100644 --- a/packages/jest-repl/src/__tests__/jest_repl.test.js +++ b/packages/jest-repl/src/__tests__/jest_repl.test.js @@ -9,7 +9,7 @@ import {spawnSync} from 'child_process'; import path from 'path'; -const JEST_RUNTIME = path.resolve(__dirname, '../../bin/jest-repl.js'); +const JEST_RUNTIME = require.resolve('../../bin/jest-repl.js'); describe('Repl', () => { describe('cli', () => { diff --git a/packages/jest-repl/src/cli/args.ts b/packages/jest-repl/src/cli/args.ts index 09f1b6392660..9aae5b444a5a 100644 --- a/packages/jest-repl/src/cli/args.ts +++ b/packages/jest-repl/src/cli/args.ts @@ -30,11 +30,6 @@ const runtimeCLIOptions: Record< description: 'Print debugging info about your jest config.', type: 'boolean', }, - version: { - alias: 'v', - description: 'Print the version and exit', - type: 'boolean', - }, watchman: { default: true, description: diff --git a/packages/jest-repl/src/cli/index.ts b/packages/jest-repl/src/cli/index.ts index 00f296512d44..94bd602fc4dd 100644 --- a/packages/jest-repl/src/cli/index.ts +++ b/packages/jest-repl/src/cli/index.ts @@ -15,7 +15,7 @@ import * as args from './args'; import {run as runtimeCLI} from './runtime-cli'; import {VERSION} from './version'; -const REPL_SCRIPT = require.resolve('./repl.js'); +const REPL_SCRIPT = require.resolve('./repl'); export function run(): void { const argv = yargs.usage(args.usage).options(args.options)