From 6ab417ee3351dd12b89706b3c73d9661f9d32744 Mon Sep 17 00:00:00 2001 From: Miguel Campos Date: Wed, 5 Dec 2018 01:32:22 -0800 Subject: [PATCH 1/8] standardizing filenames: jest-backticks to jestBackticks --- .../__mocks__/{jest-backticks.js => jestBackticks.js} | 0 .../{jest-backticks.js => jestBackticks.js} | 0 .../__tests__/integration.test.js | 4 ++-- e2e/babel-plugin-jest-hoist/mock-file.js | 11 ----------- 4 files changed, 2 insertions(+), 13 deletions(-) rename e2e/babel-plugin-jest-hoist/__test_modules__/__mocks__/{jest-backticks.js => jestBackticks.js} (100%) rename e2e/babel-plugin-jest-hoist/__test_modules__/{jest-backticks.js => jestBackticks.js} (100%) delete mode 100644 e2e/babel-plugin-jest-hoist/mock-file.js diff --git a/e2e/babel-plugin-jest-hoist/__test_modules__/__mocks__/jest-backticks.js b/e2e/babel-plugin-jest-hoist/__test_modules__/__mocks__/jestBackticks.js similarity index 100% rename from e2e/babel-plugin-jest-hoist/__test_modules__/__mocks__/jest-backticks.js rename to e2e/babel-plugin-jest-hoist/__test_modules__/__mocks__/jestBackticks.js diff --git a/e2e/babel-plugin-jest-hoist/__test_modules__/jest-backticks.js b/e2e/babel-plugin-jest-hoist/__test_modules__/jestBackticks.js similarity index 100% rename from e2e/babel-plugin-jest-hoist/__test_modules__/jest-backticks.js rename to e2e/babel-plugin-jest-hoist/__test_modules__/jestBackticks.js diff --git a/e2e/babel-plugin-jest-hoist/__tests__/integration.test.js b/e2e/babel-plugin-jest-hoist/__tests__/integration.test.js index c825984639b3..e648e1d96699 100644 --- a/e2e/babel-plugin-jest-hoist/__tests__/integration.test.js +++ b/e2e/babel-plugin-jest-hoist/__tests__/integration.test.js @@ -19,7 +19,7 @@ import b from '../__test_modules__/b'; import c from '../__test_modules__/c'; import d from '../__test_modules__/d'; import e from '../__test_modules__/e'; -import jestBackticks from '../__test_modules__/jest-backticks'; +import jestBackticks from '../__test_modules__/jestBackticks'; // The virtual mock call below will be hoisted above this `require` call. const virtualModule = require('virtual-module'); @@ -45,7 +45,7 @@ jest.mock('../__test_modules__/e', () => { }, }; }); -jest.mock(`../__test_modules__/jest-backticks`); +jest.mock(`../__test_modules__/jestBackticks`); jest.mock('virtual-module', () => 'kiwi', {virtual: true}); // This has types that should be ignored by the out-of-scope variables check. jest.mock('has-flow-types', () => (props: {children: mixed}) => 3, { diff --git a/e2e/babel-plugin-jest-hoist/mock-file.js b/e2e/babel-plugin-jest-hoist/mock-file.js deleted file mode 100644 index 9ebe88b1c663..000000000000 --- a/e2e/babel-plugin-jest-hoist/mock-file.js +++ /dev/null @@ -1,11 +0,0 @@ -/** - * Copyright (c) 2014-present, Facebook, Inc. All rights reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ - -jest.mock('./banana', () => { - const exports = 'apple'; - return exports; -}); From 18a8883216938fcc7308f705819b71312777beec Mon Sep 17 00:00:00 2001 From: Miguel Campos Date: Wed, 5 Dec 2018 01:33:24 -0800 Subject: [PATCH 2/8] standardizing filenames: mock-file to mock_file --- .../__tests__/integration.test.js | 2 +- e2e/babel-plugin-jest-hoist/mock_file.js | 11 +++++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) create mode 100644 e2e/babel-plugin-jest-hoist/mock_file.js diff --git a/e2e/babel-plugin-jest-hoist/__tests__/integration.test.js b/e2e/babel-plugin-jest-hoist/__tests__/integration.test.js index e648e1d96699..14d0a760dcc4 100644 --- a/e2e/babel-plugin-jest-hoist/__tests__/integration.test.js +++ b/e2e/babel-plugin-jest-hoist/__tests__/integration.test.js @@ -123,7 +123,7 @@ describe('babel-plugin-jest-hoist', () => { }); it('requires modules that also call jest.mock', () => { - require('../mock-file'); + require('../mock_file'); const mock = require('../banana'); expect(mock).toEqual('apple'); }); diff --git a/e2e/babel-plugin-jest-hoist/mock_file.js b/e2e/babel-plugin-jest-hoist/mock_file.js new file mode 100644 index 000000000000..9ebe88b1c663 --- /dev/null +++ b/e2e/babel-plugin-jest-hoist/mock_file.js @@ -0,0 +1,11 @@ +/** + * Copyright (c) 2014-present, Facebook, Inc. All rights reserved. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ + +jest.mock('./banana', () => { + const exports = 'apple'; + return exports; +}); From c2833c215ff9507a2186dcbde6751c86cd875008 Mon Sep 17 00:00:00 2001 From: Miguel Campos Date: Wed, 5 Dec 2018 02:17:35 -0800 Subject: [PATCH 3/8] updating changelog --- CHANGELOG.md | 2 +- e2e/babel-plugin-jest-hoist/.babelrc | 12 ------------ 2 files changed, 1 insertion(+), 13 deletions(-) delete mode 100644 e2e/babel-plugin-jest-hoist/.babelrc diff --git a/CHANGELOG.md b/CHANGELOG.md index 925911127054..3ee8e22c6ed5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -113,7 +113,7 @@ - `[*]` Add check for Facebook copyright headers on CI ([#7370](https://github.com/facebook/jest/pull/7370)) - `[jest-haste-map]` Refactor `dependencyExtractor` and tests ([#7385](https://github.com/facebook/jest/pull/7385)) - `[docs]` Clarify conditional setting of `NODE_ENV` ([#7369](https://github.com/facebook/jest/pull/7369)) -- `[*]` Standardize file names ([#7316](https://github.com/facebook/jest/pull/7316), [#7266](https://github.com/facebook/jest/pull/7266), [#7238](https://github.com/facebook/jest/pull/7238), [#7314](https://github.com/facebook/jest/pull/7314)) +- `[*]` Standardize file names ([#7316](https://github.com/facebook/jest/pull/7316), [#7266](https://github.com/facebook/jest/pull/7266), [#7238](https://github.com/facebook/jest/pull/7238), [#7314](https://github.com/facebook/jest/pull/7314), [#7467](https://github.com/facebook/jest/pull/7467)) - `[docs]` Add `testPathIgnorePatterns` in CLI documentation ([#7440](https://github.com/facebook/jest/pull/7440)) ### Performance diff --git a/e2e/babel-plugin-jest-hoist/.babelrc b/e2e/babel-plugin-jest-hoist/.babelrc deleted file mode 100644 index d5b3412c8492..000000000000 --- a/e2e/babel-plugin-jest-hoist/.babelrc +++ /dev/null @@ -1,12 +0,0 @@ -{ - "presets": [ - "es2015", - { - "plugins": [ - "jest-hoist", - "transform-flow-strip-types" - ] - } - ], - "retainLines": true -} From 29018c65c28d87b87a6428b0264f54b037055842 Mon Sep 17 00:00:00 2001 From: Miguel Campos Date: Wed, 5 Dec 2018 02:17:35 -0800 Subject: [PATCH 4/8] updating changelog --- CHANGELOG.md | 2 +- e2e/babel-plugin-jest-hoist/.babelrc | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 925911127054..3ee8e22c6ed5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -113,7 +113,7 @@ - `[*]` Add check for Facebook copyright headers on CI ([#7370](https://github.com/facebook/jest/pull/7370)) - `[jest-haste-map]` Refactor `dependencyExtractor` and tests ([#7385](https://github.com/facebook/jest/pull/7385)) - `[docs]` Clarify conditional setting of `NODE_ENV` ([#7369](https://github.com/facebook/jest/pull/7369)) -- `[*]` Standardize file names ([#7316](https://github.com/facebook/jest/pull/7316), [#7266](https://github.com/facebook/jest/pull/7266), [#7238](https://github.com/facebook/jest/pull/7238), [#7314](https://github.com/facebook/jest/pull/7314)) +- `[*]` Standardize file names ([#7316](https://github.com/facebook/jest/pull/7316), [#7266](https://github.com/facebook/jest/pull/7266), [#7238](https://github.com/facebook/jest/pull/7238), [#7314](https://github.com/facebook/jest/pull/7314), [#7467](https://github.com/facebook/jest/pull/7467)) - `[docs]` Add `testPathIgnorePatterns` in CLI documentation ([#7440](https://github.com/facebook/jest/pull/7440)) ### Performance diff --git a/e2e/babel-plugin-jest-hoist/.babelrc b/e2e/babel-plugin-jest-hoist/.babelrc index d5b3412c8492..d196e9c9fff2 100644 --- a/e2e/babel-plugin-jest-hoist/.babelrc +++ b/e2e/babel-plugin-jest-hoist/.babelrc @@ -9,4 +9,4 @@ } ], "retainLines": true -} +} \ No newline at end of file From 05e47baf1570957dc2f2423d4ee9e2be9de64c2d Mon Sep 17 00:00:00 2001 From: Miguel Campos Date: Wed, 5 Dec 2018 02:56:45 -0800 Subject: [PATCH 5/8] standardizing filenames: revising mock_file.js to mockFile.js --- e2e/babel-plugin-jest-hoist/__tests__/integration.test.js | 2 +- e2e/babel-plugin-jest-hoist/{mock_file.js => mockFile.js} | 0 2 files changed, 1 insertion(+), 1 deletion(-) rename e2e/babel-plugin-jest-hoist/{mock_file.js => mockFile.js} (100%) diff --git a/e2e/babel-plugin-jest-hoist/__tests__/integration.test.js b/e2e/babel-plugin-jest-hoist/__tests__/integration.test.js index 14d0a760dcc4..12c241b7ad03 100644 --- a/e2e/babel-plugin-jest-hoist/__tests__/integration.test.js +++ b/e2e/babel-plugin-jest-hoist/__tests__/integration.test.js @@ -123,7 +123,7 @@ describe('babel-plugin-jest-hoist', () => { }); it('requires modules that also call jest.mock', () => { - require('../mock_file'); + require('../mockFile'); const mock = require('../banana'); expect(mock).toEqual('apple'); }); diff --git a/e2e/babel-plugin-jest-hoist/mock_file.js b/e2e/babel-plugin-jest-hoist/mockFile.js similarity index 100% rename from e2e/babel-plugin-jest-hoist/mock_file.js rename to e2e/babel-plugin-jest-hoist/mockFile.js From 762ab5e7e756d95430141951af06b47cada5cebb Mon Sep 17 00:00:00 2001 From: Miguel Campos Date: Wed, 5 Dec 2018 03:07:50 -0800 Subject: [PATCH 6/8] updating changelog --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3ee8e22c6ed5..01cb9cb00718 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -114,7 +114,7 @@ - `[jest-haste-map]` Refactor `dependencyExtractor` and tests ([#7385](https://github.com/facebook/jest/pull/7385)) - `[docs]` Clarify conditional setting of `NODE_ENV` ([#7369](https://github.com/facebook/jest/pull/7369)) - `[*]` Standardize file names ([#7316](https://github.com/facebook/jest/pull/7316), [#7266](https://github.com/facebook/jest/pull/7266), [#7238](https://github.com/facebook/jest/pull/7238), [#7314](https://github.com/facebook/jest/pull/7314), [#7467](https://github.com/facebook/jest/pull/7467)) -- `[docs]` Add `testPathIgnorePatterns` in CLI documentation ([#7440](https://github.com/facebook/jest/pull/7440)) +- `[docs]` Add `testPathIgnorePatterns` in CLI documentation ([#7440](https://github.com/facebook/jest/pull/7440) ) ### Performance From ff195673b19bae6bc7dfccdb9832d95096c163c2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Pierzcha=C5=82a?= Date: Wed, 5 Dec 2018 03:28:06 -0800 Subject: [PATCH 7/8] Update CHANGELOG.md Co-Authored-By: GGonryun <12995427+GGonryun@users.noreply.github.com> --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 01cb9cb00718..3ee8e22c6ed5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -114,7 +114,7 @@ - `[jest-haste-map]` Refactor `dependencyExtractor` and tests ([#7385](https://github.com/facebook/jest/pull/7385)) - `[docs]` Clarify conditional setting of `NODE_ENV` ([#7369](https://github.com/facebook/jest/pull/7369)) - `[*]` Standardize file names ([#7316](https://github.com/facebook/jest/pull/7316), [#7266](https://github.com/facebook/jest/pull/7266), [#7238](https://github.com/facebook/jest/pull/7238), [#7314](https://github.com/facebook/jest/pull/7314), [#7467](https://github.com/facebook/jest/pull/7467)) -- `[docs]` Add `testPathIgnorePatterns` in CLI documentation ([#7440](https://github.com/facebook/jest/pull/7440) ) +- `[docs]` Add `testPathIgnorePatterns` in CLI documentation ([#7440](https://github.com/facebook/jest/pull/7440)) ### Performance From bae77b49105e89654cf6c57c12a247d2c7a7ad2c Mon Sep 17 00:00:00 2001 From: Miguel Campos <12995427+GGonryun@users.noreply.github.com> Date: Wed, 5 Dec 2018 03:36:04 -0800 Subject: [PATCH 8/8] Update .babelrc --- e2e/babel-plugin-jest-hoist/.babelrc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/e2e/babel-plugin-jest-hoist/.babelrc b/e2e/babel-plugin-jest-hoist/.babelrc index d196e9c9fff2..d5b3412c8492 100644 --- a/e2e/babel-plugin-jest-hoist/.babelrc +++ b/e2e/babel-plugin-jest-hoist/.babelrc @@ -9,4 +9,4 @@ } ], "retainLines": true -} \ No newline at end of file +}