Skip to content

Commit

Permalink
style: fix indentation of mock, runtime, jasmine2
Browse files Browse the repository at this point in the history
  • Loading branch information
phra committed Dec 18, 2017
1 parent 26ce2c8 commit 9c751da
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 27 deletions.
8 changes: 4 additions & 4 deletions packages/jest-jasmine2/src/jasmine/Env.js
Expand Up @@ -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);
Expand Down
16 changes: 8 additions & 8 deletions packages/jest-mock/src/index.js
Expand Up @@ -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',
);
}

Expand Down Expand Up @@ -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',
);
}

Expand Down
30 changes: 15 additions & 15 deletions packages/jest-runtime/src/index.js
Expand Up @@ -30,21 +30,21 @@ import {options as cliOptions} from './cli/args';

type Module = {|
children: Array<Module>,
exports: any,
filename: string,
id: string,
loaded: boolean,
parent?: Module,
paths?: Array<Path>,
require?: (id: string) => any,
exports: any,
filename: string,
id: string,
loaded: boolean,
parent?: Module,
paths?: Array<Path>,
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 = {|
Expand Down Expand Up @@ -550,7 +550,7 @@ class Runtime {
filename,
// $FlowFixMe
(localModule.require: LocalModuleRequire),
), // jest object
), // jest object
);

this._isCurrentlyExecutingManualMock = origCurrExecutingManualMock;
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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;
};

Expand Down

0 comments on commit 9c751da

Please sign in to comment.