Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Standardize filenames in packages/expect #7306

Merged
merged 11 commits into from
Oct 31, 2018
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@

### Fixes

- `[expect]` Standardize file naming in `expect` ([#7306](https://github.com/facebook/jest/pull/7306))
- `[jest-each]` Add empty array validation check ([#7249](https://github.com/facebook/jest/pull/7249))
- `[jest-cli]` Interrupt tests if interactive watch plugin key is pressed ([#7222](https://github.com/facebook/jest/pull/7222))
- `[jest-cli]` Fix coverage summary reporting ([#7058](https://github.com/facebook/jest/pull/7058))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ const {
stringNotContaining,
stringMatching,
stringNotMatching,
} = require('../asymmetric_matchers');
} = require('../asymmetricMatchers');

test('Any.asymmetricMatch()', () => {
const Thing = function() {};
Expand Down
2 changes: 1 addition & 1 deletion packages/expect/src/__tests__/extend.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

const matcherUtils = require('jest-matcher-utils');
const {iterableEquality, subsetEquality} = require('../utils');
const {equals} = require('../jasmine_utils');
const {equals} = require('../jasmineUtils');
const jestExpect = require('../');

jestExpect.extend({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
*/
'use strict';

const fakeChalk = jest.requireActual('../fake_chalk');
const fakeChalk = jest.requireActual('../fakeChalk');

describe('Fake Chalk', () => {
it('returns input when invoked', () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,7 @@
* @flow
*/

import {
equals,
fnNameFor,
hasProperty,
isA,
isUndefined,
} from './jasmine_utils';
import {equals, fnNameFor, hasProperty, isA, isUndefined} from './jasmineUtils';

import {emptyObject} from './utils';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import {
pluralize,
} from 'jest-matcher-utils';

import {getState, setState} from './jest_matchers_object';
import {getState, setState} from './jestMatchersObject';

const resetAssertionsLocalState = () => {
setState({
Expand Down
File renamed without changes.
12 changes: 6 additions & 6 deletions packages/expect/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,11 @@ import type {
import * as matcherUtils from 'jest-matcher-utils';
import {iterableEquality, subsetEquality} from './utils';
import matchers from './matchers';
import spyMatchers from './spy_matchers';
import spyMatchers from './spyMatchers';
import toThrowMatchers, {
createMatcher as createThrowMatcher,
} from './to_throw_matchers';
import {equals} from './jasmine_utils';
} from './toThrowMatchers';
import {equals} from './jasmineUtils';
import {
any,
anything,
Expand All @@ -39,15 +39,15 @@ import {
stringNotContaining,
stringMatching,
stringNotMatching,
} from './asymmetric_matchers';
} from './asymmetricMatchers';
import {
INTERNAL_MATCHER_FLAG,
getState,
setState,
getMatchers,
setMatchers,
} from './jest_matchers_object';
import extractExpectedAssertionsErrors from './extract_expected_assertions_errors';
} from './jestMatchersObject';
import extractExpectedAssertionsErrors from './extractExpectedAssertionsErrors';

class JestAssertionError extends Error {
matcherResult: any;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* @flow
*/

import {AsymmetricMatcher} from './asymmetric_matchers';
import {AsymmetricMatcher} from './asymmetricMatchers';
import type {
Expect,
MatchersObject,
Expand Down
2 changes: 1 addition & 1 deletion packages/expect/src/matchers.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ import {
typeEquality,
isOneline,
} from './utils';
import {equals} from './jasmine_utils';
import {equals} from './jasmineUtils';

type ContainIterable =
| Array<any>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import {
printWithType,
RECEIVED_COLOR,
} from 'jest-matcher-utils';
import {equals} from './jasmine_utils';
import {equals} from './jasmineUtils';
import {iterableEquality, partition, isOneline} from './utils';
import diff from 'jest-diff';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import {
printExpected,
printWithType,
} from 'jest-matcher-utils';
import {equals} from './jasmine_utils';
import {equals} from './jasmineUtils';
import {isError} from './utils';

export const createMatcher = (matcherName: string, fromPromise?: boolean) => (
Expand Down
2 changes: 1 addition & 1 deletion packages/expect/src/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import {
isA,
isImmutableUnorderedKeyed,
isImmutableUnorderedSet,
} from './jasmine_utils';
} from './jasmineUtils';

type GetPath = {
hasEndProp?: boolean,
Expand Down
2 changes: 1 addition & 1 deletion scripts/browserBuild.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ function browserBuild(pkgName, entryPath, destination) {
{
resolveId(id) {
return id === 'chalk'
? path.resolve(__dirname, '../packages/expect/build/fake_chalk.js')
? path.resolve(__dirname, '../packages/expect/build/fakeChalk.js')
: undefined;
},
},
Expand Down