From 7cdf0232e2d4387c650efe5d74a6771f777fb651 Mon Sep 17 00:00:00 2001 From: Nitin Kumar Date: Fri, 30 Oct 2020 08:03:35 +0530 Subject: [PATCH] chore(jest-snapshot): standardize files name --- .../src/{inline_snapshots.ts => InlineSnapshots.ts} | 0 .../src/{snapshot_resolver.ts => SnapshotResolver.ts} | 0 packages/jest-snapshot/src/State.ts | 2 +- .../{inline_snapshots.test.ts => InlineSnapshots.test.ts} | 2 +- .../{snapshot_resolver.test.ts => SnapshotResolver.test.ts} | 2 +- ...shot_resolver.test.ts.snap => SnapshotResolver.test.ts.snap} | 0 ...mock_serializer.test.ts.snap => mockSerializer.test.ts.snap} | 0 .../{mock_serializer.test.ts => mockSerializer.test.ts} | 2 +- .../__tests__/{throw_matcher.test.ts => throwMatcher.test.ts} | 2 +- packages/jest-snapshot/src/index.ts | 2 +- .../jest-snapshot/src/{mock_serializer.ts => mockSerializer.ts} | 0 packages/jest-snapshot/src/plugins.ts | 2 +- 12 files changed, 7 insertions(+), 7 deletions(-) rename packages/jest-snapshot/src/{inline_snapshots.ts => InlineSnapshots.ts} (100%) rename packages/jest-snapshot/src/{snapshot_resolver.ts => SnapshotResolver.ts} (100%) rename packages/jest-snapshot/src/__tests__/{inline_snapshots.test.ts => InlineSnapshots.test.ts} (99%) rename packages/jest-snapshot/src/__tests__/{snapshot_resolver.test.ts => SnapshotResolver.test.ts} (97%) rename packages/jest-snapshot/src/__tests__/__snapshots__/{snapshot_resolver.test.ts.snap => SnapshotResolver.test.ts.snap} (100%) rename packages/jest-snapshot/src/__tests__/__snapshots__/{mock_serializer.test.ts.snap => mockSerializer.test.ts.snap} (100%) rename packages/jest-snapshot/src/__tests__/{mock_serializer.test.ts => mockSerializer.test.ts} (99%) rename packages/jest-snapshot/src/__tests__/{throw_matcher.test.ts => throwMatcher.test.ts} (97%) rename packages/jest-snapshot/src/{mock_serializer.ts => mockSerializer.ts} (100%) diff --git a/packages/jest-snapshot/src/inline_snapshots.ts b/packages/jest-snapshot/src/InlineSnapshots.ts similarity index 100% rename from packages/jest-snapshot/src/inline_snapshots.ts rename to packages/jest-snapshot/src/InlineSnapshots.ts diff --git a/packages/jest-snapshot/src/snapshot_resolver.ts b/packages/jest-snapshot/src/SnapshotResolver.ts similarity index 100% rename from packages/jest-snapshot/src/snapshot_resolver.ts rename to packages/jest-snapshot/src/SnapshotResolver.ts diff --git a/packages/jest-snapshot/src/State.ts b/packages/jest-snapshot/src/State.ts index 67d26015c582..fecfbf86996a 100644 --- a/packages/jest-snapshot/src/State.ts +++ b/packages/jest-snapshot/src/State.ts @@ -19,7 +19,7 @@ import { serialize, testNameToKey, } from './utils'; -import {InlineSnapshot, saveInlineSnapshots} from './inline_snapshots'; +import {InlineSnapshot, saveInlineSnapshots} from './InlineSnapshots'; import type {BabelTraverse, Prettier, SnapshotData} from './types'; export type SnapshotStateOptions = { diff --git a/packages/jest-snapshot/src/__tests__/inline_snapshots.test.ts b/packages/jest-snapshot/src/__tests__/InlineSnapshots.test.ts similarity index 99% rename from packages/jest-snapshot/src/__tests__/inline_snapshots.test.ts rename to packages/jest-snapshot/src/__tests__/InlineSnapshots.test.ts index 6edd9ad819ca..1de8f4ca3dcc 100644 --- a/packages/jest-snapshot/src/__tests__/inline_snapshots.test.ts +++ b/packages/jest-snapshot/src/__tests__/InlineSnapshots.test.ts @@ -21,7 +21,7 @@ import prettier from 'prettier'; import babelTraverse from '@babel/traverse'; import {Frame} from 'jest-message-util'; -import {saveInlineSnapshots} from '../inline_snapshots'; +import {saveInlineSnapshots} from '../InlineSnapshots'; beforeEach(() => { (prettier.resolveConfig.sync as jest.Mock).mockReset(); }); diff --git a/packages/jest-snapshot/src/__tests__/snapshot_resolver.test.ts b/packages/jest-snapshot/src/__tests__/SnapshotResolver.test.ts similarity index 97% rename from packages/jest-snapshot/src/__tests__/snapshot_resolver.test.ts rename to packages/jest-snapshot/src/__tests__/SnapshotResolver.test.ts index fcae8b128d97..312d6aca21b0 100644 --- a/packages/jest-snapshot/src/__tests__/snapshot_resolver.test.ts +++ b/packages/jest-snapshot/src/__tests__/SnapshotResolver.test.ts @@ -8,7 +8,7 @@ import * as path from 'path'; import {makeProjectConfig} from '../../../../TestUtils'; -import {SnapshotResolver, buildSnapshotResolver} from '../snapshot_resolver'; +import {SnapshotResolver, buildSnapshotResolver} from '../SnapshotResolver'; describe('defaults', () => { let snapshotResolver: SnapshotResolver; diff --git a/packages/jest-snapshot/src/__tests__/__snapshots__/snapshot_resolver.test.ts.snap b/packages/jest-snapshot/src/__tests__/__snapshots__/SnapshotResolver.test.ts.snap similarity index 100% rename from packages/jest-snapshot/src/__tests__/__snapshots__/snapshot_resolver.test.ts.snap rename to packages/jest-snapshot/src/__tests__/__snapshots__/SnapshotResolver.test.ts.snap diff --git a/packages/jest-snapshot/src/__tests__/__snapshots__/mock_serializer.test.ts.snap b/packages/jest-snapshot/src/__tests__/__snapshots__/mockSerializer.test.ts.snap similarity index 100% rename from packages/jest-snapshot/src/__tests__/__snapshots__/mock_serializer.test.ts.snap rename to packages/jest-snapshot/src/__tests__/__snapshots__/mockSerializer.test.ts.snap diff --git a/packages/jest-snapshot/src/__tests__/mock_serializer.test.ts b/packages/jest-snapshot/src/__tests__/mockSerializer.test.ts similarity index 99% rename from packages/jest-snapshot/src/__tests__/mock_serializer.test.ts rename to packages/jest-snapshot/src/__tests__/mockSerializer.test.ts index 993ee3aa9963..902c72540d85 100644 --- a/packages/jest-snapshot/src/__tests__/mock_serializer.test.ts +++ b/packages/jest-snapshot/src/__tests__/mockSerializer.test.ts @@ -7,7 +7,7 @@ import prettyFormat = require('pretty-format'); -import plugin from '../mock_serializer'; +import plugin from '../mockSerializer'; test('mock with 0 calls and default name', () => { const fn = jest.fn(); diff --git a/packages/jest-snapshot/src/__tests__/throw_matcher.test.ts b/packages/jest-snapshot/src/__tests__/throwMatcher.test.ts similarity index 97% rename from packages/jest-snapshot/src/__tests__/throw_matcher.test.ts rename to packages/jest-snapshot/src/__tests__/throwMatcher.test.ts index bbe8b9d477db..aecbad73d34c 100644 --- a/packages/jest-snapshot/src/__tests__/throw_matcher.test.ts +++ b/packages/jest-snapshot/src/__tests__/throwMatcher.test.ts @@ -5,7 +5,7 @@ * LICENSE file in the root directory of this source tree. */ -import jestSnapshot from '../'; +import jestSnapshot from '..'; const {toThrowErrorMatchingSnapshot} = jestSnapshot; diff --git a/packages/jest-snapshot/src/index.ts b/packages/jest-snapshot/src/index.ts index c8b62d08b9ee..f2b978c96220 100644 --- a/packages/jest-snapshot/src/index.ts +++ b/packages/jest-snapshot/src/index.ts @@ -26,7 +26,7 @@ import { SnapshotResolver as JestSnapshotResolver, buildSnapshotResolver, isSnapshotPath, -} from './snapshot_resolver'; +} from './SnapshotResolver'; import SnapshotState from './State'; import {addSerializer, getSerializers} from './plugins'; import { diff --git a/packages/jest-snapshot/src/mock_serializer.ts b/packages/jest-snapshot/src/mockSerializer.ts similarity index 100% rename from packages/jest-snapshot/src/mock_serializer.ts rename to packages/jest-snapshot/src/mockSerializer.ts diff --git a/packages/jest-snapshot/src/plugins.ts b/packages/jest-snapshot/src/plugins.ts index 579c638a84cd..10c481474f68 100644 --- a/packages/jest-snapshot/src/plugins.ts +++ b/packages/jest-snapshot/src/plugins.ts @@ -7,7 +7,7 @@ import prettyFormat = require('pretty-format'); -import jestMockSerializer from './mock_serializer'; +import jestMockSerializer from './mockSerializer'; const { DOMCollection,