Skip to content

Commit

Permalink
Standardize file names in packages/jest-resolve (#7292)
Browse files Browse the repository at this point in the history
* Rename files to follow facebook's conventions

* Rename files to follow facebook's conventions for test

* Remove .js

* Fix file path
  • Loading branch information
Anenth authored and thymikee committed Oct 29, 2018
1 parent b69780d commit 682afa9
Show file tree
Hide file tree
Showing 8 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion e2e/custom-resolver/resolver.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

const {
default: defaultResolver,
} = require('jest-resolve/build/default_resolver');
} = require('jest-resolve/build/defaultResolver');

const exportedModules = new Map([
['foo', 'foo'],
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Copyright (c) 2014-present, Facebook, Inc. All rights reserved.
// @flow

import isBuiltinModule from '../is_builtin_module';
import isBuiltinModule from '../isBuiltinModule';

describe('isBuiltinModule', () => {
it('should return true for the `path` module', () => {
Expand Down
2 changes: 1 addition & 1 deletion packages/jest-resolve/src/__tests__/resolve.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ const path = require('path');
const ModuleMap = require('jest-haste-map').ModuleMap;
const Resolver = require('../');
const userResolver = require('../__mocks__/userResolver');
const nodeModulesPaths = require('../node_modules_paths').default;
const nodeModulesPaths = require('../nodeModulesPaths').default;

beforeEach(() => {
userResolver.mockClear();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ import type {ErrorWithCode} from 'types/Errors';
import browserResolve from 'browser-resolve';
import fs from 'fs';
import path from 'path';
import isBuiltinModule from './is_builtin_module';
import nodeModulesPaths from './node_modules_paths';
import isBuiltinModule from './isBuiltinModule';
import nodeModulesPaths from './nodeModulesPaths';

type ResolverOptions = {|
basedir: Path,
Expand Down
6 changes: 3 additions & 3 deletions packages/jest-resolve/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ import type {ErrorWithCode} from 'types/Errors';

import fs from 'fs';
import path from 'path';
import nodeModulesPaths from './node_modules_paths';
import isBuiltinModule from './is_builtin_module';
import defaultResolver from './default_resolver.js';
import nodeModulesPaths from './nodeModulesPaths';
import isBuiltinModule from './isBuiltinModule';
import defaultResolver from './defaultResolver';
import chalk from 'chalk';

type ResolverConfig = {|
Expand Down
2 changes: 1 addition & 1 deletion packages/jest-runtime/src/__tests__/defaultResolver.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@
* of patent rights can be found in the PATENTS file in the same directory.
*
*/
import resolver from 'jest-resolve/build/default_resolver.js';
import resolver from 'jest-resolve/build/defaultResolver.js';
module.exports = resolver;

0 comments on commit 682afa9

Please sign in to comment.