From 81f308baf939021a2761463bcf6772ea094c08d9 Mon Sep 17 00:00:00 2001 From: Simen Bekkhus Date: Mon, 19 Aug 2019 14:02:47 +0200 Subject: [PATCH] moar lint --- e2e/Utils.ts | 7 ++++--- packages/jest-circus/src/__mocks__/testUtils.ts | 1 + packages/jest-get-type/src/__tests__/isPrimitive.test.ts | 1 + packages/jest-runtime/src/__tests__/runtime_cli.test.js | 3 ++- 4 files changed, 8 insertions(+), 4 deletions(-) diff --git a/e2e/Utils.ts b/e2e/Utils.ts index 58421fb9f737..12baf5f93797 100644 --- a/e2e/Utils.ts +++ b/e2e/Utils.ts @@ -10,14 +10,15 @@ import * as fs from 'fs'; import * as path from 'path'; import {Config} from '@jest/types'; -import {ExecaReturns, sync as spawnSync} from 'execa'; +// eslint-disable-next-line import/named +import {ExecaReturnValue, sync as spawnSync} from 'execa'; import {createDirectory} from 'jest-util'; import rimraf from 'rimraf'; -export type RunResult = ExecaReturns & { +interface RunResult extends ExecaReturnValue { status: number; error: Error; -}; +} export const run = (cmd: string, cwd?: Config.Path): RunResult => { const args = cmd.split(/\s/).slice(1); const spawnOptions = {cwd, preferLocal: false, reject: false}; diff --git a/packages/jest-circus/src/__mocks__/testUtils.ts b/packages/jest-circus/src/__mocks__/testUtils.ts index 6e0e5a434e92..8886eb27017f 100644 --- a/packages/jest-circus/src/__mocks__/testUtils.ts +++ b/packages/jest-circus/src/__mocks__/testUtils.ts @@ -9,6 +9,7 @@ import * as fs from 'fs'; import {tmpdir} from 'os'; import * as path from 'path'; import {createHash} from 'crypto'; +// eslint-disable-next-line import/named import {ExecaSyncReturnValue, sync as spawnSync} from 'execa'; import {skipSuiteOnWindows} from '@jest/test-utils'; diff --git a/packages/jest-get-type/src/__tests__/isPrimitive.test.ts b/packages/jest-get-type/src/__tests__/isPrimitive.test.ts index 1428cbc3e435..9d0a6ab663c4 100644 --- a/packages/jest-get-type/src/__tests__/isPrimitive.test.ts +++ b/packages/jest-get-type/src/__tests__/isPrimitive.test.ts @@ -6,6 +6,7 @@ * */ +// eslint-disable-next-line import/named import {isPrimitive} from '..'; describe('.isPrimitive()', () => { diff --git a/packages/jest-runtime/src/__tests__/runtime_cli.test.js b/packages/jest-runtime/src/__tests__/runtime_cli.test.js index 611b1794eb65..2c78d9aa0b1a 100644 --- a/packages/jest-runtime/src/__tests__/runtime_cli.test.js +++ b/packages/jest-runtime/src/__tests__/runtime_cli.test.js @@ -6,6 +6,7 @@ */ import path from 'path'; +// eslint-disable-next-line import/named import {sync as spawnSync} from 'execa'; import {skipSuiteOnWindows} from '@jest/test-utils'; @@ -24,7 +25,7 @@ describe('Runtime', () => { describe('cli', () => { it('fails with no path', () => { const expectedOutput = - 'Please provide a path to a script. (See --help for details)\n'; + 'Please provide a path to a script. (See --help for details)'; expect(run([]).stdout).toBe(expectedOutput); });