From 9c751da52a25431d1d986594e8039f0cf62f95d4 Mon Sep 17 00:00:00 2001 From: phra Date: Mon, 18 Dec 2017 15:12:12 +0100 Subject: [PATCH] style: fix indentation of mock, runtime, jasmine2 --- packages/jest-jasmine2/src/jasmine/Env.js | 8 +++--- packages/jest-mock/src/index.js | 16 ++++++------ packages/jest-runtime/src/index.js | 30 +++++++++++------------ 3 files changed, 27 insertions(+), 27 deletions(-) diff --git a/packages/jest-jasmine2/src/jasmine/Env.js b/packages/jest-jasmine2/src/jasmine/Env.js index b542262f193f..5c6b671f96db 100644 --- a/packages/jest-jasmine2/src/jasmine/Env.js +++ b/packages/jest-jasmine2/src/jasmine/Env.js @@ -438,10 +438,10 @@ export default function(j$) { if (currentSpec !== null) { throw new Error( 'Tests cannot be nested. Test `' + - spec.description + - '` cannot run because it is nested within `' + - currentSpec.description + - '`.', + spec.description + + '` cannot run because it is nested within `' + + currentSpec.description + + '`.', ); } currentDeclarationSuite.addChild(spec); diff --git a/packages/jest-mock/src/index.js b/packages/jest-mock/src/index.js index b5f6ac95f0af..4e490bc9b216 100644 --- a/packages/jest-mock/src/index.js +++ b/packages/jest-mock/src/index.js @@ -672,10 +672,10 @@ class ModuleMockerClass { if (typeof original !== 'function') { throw new Error( 'Cannot spy the ' + - methodName + - ' property because it is not a function; ' + - this._typeOf(original) + - ' given instead', + methodName + + ' property because it is not a function; ' + + this._typeOf(original) + + ' given instead', ); } @@ -731,10 +731,10 @@ class ModuleMockerClass { if (typeof original !== 'function') { throw new Error( 'Cannot spy the ' + - methodName + - ' property because it is not a function; ' + - this._typeOf(original) + - ' given instead', + methodName + + ' property because it is not a function; ' + + this._typeOf(original) + + ' given instead', ); } diff --git a/packages/jest-runtime/src/index.js b/packages/jest-runtime/src/index.js index 01c3e86a675b..38cc5cd7f43a 100644 --- a/packages/jest-runtime/src/index.js +++ b/packages/jest-runtime/src/index.js @@ -30,21 +30,21 @@ import {options as cliOptions} from './cli/args'; type Module = {| children: Array, - exports: any, - filename: string, - id: string, - loaded: boolean, - parent?: Module, - paths?: Array, - require?: (id: string) => any, + exports: any, + filename: string, + id: string, + loaded: boolean, + parent?: Module, + paths?: Array, + require?: (id: string) => any, |}; type HasteMapOptions = {| console?: Console, - maxWorkers: number, - resetCache: boolean, - watch?: boolean, - watchman: boolean, + maxWorkers: number, + resetCache: boolean, + watch?: boolean, + watchman: boolean, |}; type InternalModuleOptions = {| @@ -550,7 +550,7 @@ class Runtime { filename, // $FlowFixMe (localModule.require: LocalModuleRequire), - ), // jest object + ), // jest object ); this._isCurrentlyExecutingManualMock = origCurrExecutingManualMock; @@ -595,7 +595,7 @@ class Runtime { if (mockMetadata == null) { throw new Error( `Failed to get mock metadata: ${modulePath}\n\n` + - `See: http://facebook.github.io/jest/docs/manual-mocks.html#content`, + `See: http://facebook.github.io/jest/docs/manual-mocks.html#content`, ); } this._mockMetaDataCache[modulePath] = mockMetadata; @@ -769,8 +769,8 @@ class Runtime { this._environment.global.jasmine ? (this._environment.global.jasmine.DEFAULT_TIMEOUT_INTERVAL = timeout) : (this._environment.global[ - Symbol.for('TEST_TIMEOUT_SYMBOL') - ] = timeout); + Symbol.for('TEST_TIMEOUT_SYMBOL') + ] = timeout); return jestObject; };