Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: jestjs/jest
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v25.5.1
Choose a base ref
...
head repository: jestjs/jest
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v26.0.0
Choose a head ref

Commits on Apr 29, 2020

  1. Copy the full SHA
    e21468d View commit details
  2. Copy the full SHA
    fdd3626 View commit details
  3. v25.5.2

    SimenB committed Apr 29, 2020
    Copy the full SHA
    ad1b9dc View commit details

Commits on Apr 30, 2020

  1. Copy the full SHA
    2fa7f4d View commit details
  2. Copy the full SHA
    3d11113 View commit details
  3. v25.5.3

    SimenB committed Apr 30, 2020
    Copy the full SHA
    80b6905 View commit details

Commits on May 1, 2020

  1. Copy the full SHA
    649796d View commit details

Commits on May 2, 2020

  1. Copy the full SHA
    78bb25a View commit details
  2. Copy the full SHA
    4f97b9f View commit details
  3. v25.5.4

    SimenB committed May 2, 2020
    Copy the full SHA
    389d137 View commit details
  4. Remove es5 builds (#9945)

    cpojer authored May 2, 2020
    Copy the full SHA
    687089b View commit details
  5. Copy the full SHA
    e19adcb View commit details
  6. Copy the full SHA
    d0623eb View commit details
  7. Copy the full SHA
    f776624 View commit details
  8. Copy the full SHA
    e8398d2 View commit details
  9. Copy the full SHA
    4087075 View commit details
  10. Copy the full SHA
    295aedc View commit details
  11. Copy the full SHA
    73acd08 View commit details
  12. Copy the full SHA
    2b32fe6 View commit details
  13. Copy the full SHA
    503a680 View commit details
  14. Copy the full SHA
    97a15e9 View commit details
  15. [BREAKING] Pojer -> Nakazawa

    cpojer committed May 2, 2020
    Copy the full SHA
    fd3062d View commit details
  16. Copy the full SHA
    37a9402 View commit details
  17. Copy the full SHA
    56782b9 View commit details
  18. Copy the full SHA
    77f7145 View commit details
  19. Copy the full SHA
    bc31829 View commit details
  20. Copy the full SHA
    6792ff2 View commit details
  21. Copy the full SHA
    c6b19a4 View commit details
  22. v26.0.0-alpha.0

    SimenB committed May 2, 2020
    Copy the full SHA
    ba962e7 View commit details
  23. Copy the full SHA
    71a048e View commit details
  24. Copy the full SHA
    ed53434 View commit details
  25. Copy the full SHA
    81fe06e View commit details
  26. Copy the full SHA
    ea04be5 View commit details
  27. Copy the full SHA
    cab5c39 View commit details
  28. Copy the full SHA
    1cc205c View commit details
  29. Copy the full SHA
    b6052e0 View commit details
  30. Updated config docs with default transform value (#8583)

    * Updated config docs - transform
    
    I've added a default option to clear up any confusion, hopefully that will make it more obvious how it should be added back in  when additional transformers are added.
    
    * Updated change log for #8583
    
    * Update docs/Configuration.md
    
    Co-Authored-By: Tim Seckinger <seckinger.tim@gmail.com>
    
    * Update Configuration.md
    
    * transform is an object instead of array - fixing.
    
    * --amend
    
    * update versioned docs
    
    Co-authored-by: Tim Seckinger <seckinger.tim@gmail.com>
    Co-authored-by: Michał Pierzchała <thymikee@gmail.com>
    3 people authored May 2, 2020
    Copy the full SHA
    3078172 View commit details
  31. Copy the full SHA
    42f920c View commit details
  32. Copy the full SHA
    7a3c997 View commit details

Commits on May 3, 2020

  1. Copy the full SHA
    2e8f8d5 View commit details
  2. Copy the full SHA
    4216b86 View commit details
  3. docs: Updated Testing Frameworks guide with React; make it generic (#…

    …9106)
    
    * Add Jest work with "testing-library/react" to Framework Guides
    
    * update frameworks guide to be generic
    
    * add changelog
    
    * use link to example docs
    
    Co-authored-by: Michał Pierzchała <thymikee@gmail.com>
    ms314006 and thymikee authored May 3, 2020
    Copy the full SHA
    5a16415 View commit details
  4. Update index.js (#9095)

    orta authored May 3, 2020
    Copy the full SHA
    2c7682c View commit details
  5. Copy the full SHA
    d7f3427 View commit details
  6. Copy the full SHA
    71631f6 View commit details
  7. Copy the full SHA
    8147af1 View commit details
  8. Copy the full SHA
    c665f22 View commit details
  9. v26.0.0-alpha.1

    SimenB committed May 3, 2020
    Copy the full SHA
    2bac04f View commit details
  10. Copy the full SHA
    5d1be03 View commit details
  11. Fix invalid re-run of tests in watch mode (#7347)

    * Add failing e2e test
    
    * Stop re-running tests when mtime has not changed
    
    * fix test
    
    * fix copyright
    
    * adjust file accessed check
    
    * bring back reading fileMetadata from async callback
    
    Co-authored-by: Michał Pierzchała <thymikee@gmail.com>
    rubennorte and thymikee authored May 3, 2020
    Copy the full SHA
    968a301 View commit details
Showing with 3,335 additions and 3,835 deletions.
  1. +1 −30 .circleci/config.yml
  2. +0 −1 .eslintignore
  3. +0 −1 .eslintrc.js
  4. +2 −8 .github/workflows/nodejs.yml
  5. +0 −1 .gitignore
  6. +57 −0 CHANGELOG.md
  7. +1 −1 CONTRIBUTING.md
  8. +1 −4 TestUtils.ts
  9. +1 −1 babel.config.js
  10. +1 −5 docs/CLI.md
  11. +27 −16 docs/Configuration.md
  12. +27 −7 docs/JestObjectAPI.md
  13. +2 −2 docs/ManualMocks.md
  14. +5 −1 docs/TestingFrameworks.md
  15. +2 −2 e2e/Utils.ts
  16. +53 −0 e2e/__tests__/__snapshots__/asyncAndCallback.test.ts.snap
  17. +65 −0 e2e/__tests__/__snapshots__/circusDeclarationErrors.test.ts.snap
  18. +1 −1 e2e/__tests__/__snapshots__/consoleLogOutputWhenRunInBand.test.ts.snap
  19. +28 −0 e2e/__tests__/__snapshots__/globals.test.ts.snap
  20. +7 −2 e2e/__tests__/__snapshots__/moduleNameMapper.test.ts.snap
  21. +1 −1 e2e/__tests__/__snapshots__/resolveNoFileExtensions.test.ts.snap
  22. +0 −2 e2e/__tests__/__snapshots__/showConfig.test.ts.snap
  23. +1 −1 e2e/__tests__/__snapshots__/transform.test.ts.snap
  24. +21 −0 e2e/__tests__/asyncAndCallback.test.ts
  25. +3 −0 e2e/__tests__/beforeEachQueue.ts
  26. +24 −0 e2e/__tests__/circusDeclarationErrors.test.ts
  27. +1 −15 e2e/__tests__/consoleLogOutputWhenRunInBand.test.ts
  28. +46 −43 e2e/__tests__/globals.test.ts
  29. +2 −2 e2e/__tests__/hasteMapSize.test.ts
  30. +28 −0 e2e/__tests__/jestEnvironmentJsdom.test.ts
  31. +20 −0 e2e/__tests__/modernFakeTimers.test.ts
  32. +14 −0 e2e/__tests__/moduleNameMapper.test.ts
  33. +22 −10 e2e/__tests__/nestedTestDefinitions.test.ts
  34. +1 −1 e2e/__tests__/overrideGlobals.test.ts
  35. +0 −72 e2e/__tests__/resolveBrowserField.test.ts
  36. +19 −0 e2e/__tests__/skipBeforeAfterAll.test.ts
  37. +1 −1 e2e/__tests__/stackTrace.test.ts
  38. +86 −0 e2e/__tests__/watchModeNoAccess.test.ts
  39. +58 −0 e2e/before-all-skipped/__tests__/beforeAllFiltered.test.js
  40. +5 −0 e2e/before-all-skipped/package.json
  41. +0 −28 e2e/browser-support/browserTest.js
  42. +20 −0 e2e/circus-declaration-errors/__tests__/asyncDefinition.test.js
  43. +5 −0 e2e/circus-declaration-errors/package.json
  44. +18 −0 e2e/modern-fake-timers/from-config/__tests__/test.js
  45. +6 −0 e2e/modern-fake-timers/from-config/package.json
  46. +20 −0 e2e/modern-fake-timers/from-jest-object/__tests__/test.js
  47. +5 −0 e2e/modern-fake-timers/from-jest-object/package.json
  48. +16 −0 e2e/module-name-mapper-correct-mock-absolute-path/__tests__/index.js
  49. +12 −0 e2e/module-name-mapper-correct-mock-absolute-path/index.js
  50. +7 −0 e2e/module-name-mapper-correct-mock-absolute-path/package.json
  51. +8 −0 e2e/module-name-mapper-correct-mock-absolute-path/src/components/Button.js
  52. +18 −0 e2e/nested-test-definitions/__tests__/nestedHookInTest.js
  53. +24 −0 e2e/promise-and-callback/__tests__/promise-and-callback.test.js
  54. +5 −0 e2e/promise-and-callback/package.json
  55. +1 −1 e2e/resolve/__tests__/resolve.test.js
  56. +1 −1 e2e/runtime-internal-module-registry/__mocks__/fs.js
  57. +2 −2 examples/automatic-mocks/__tests__/{genMockFromModule.test.js → createMockFromModule.test.js}
  58. +1 −1 examples/manual-mocks/__mocks__/fs.js
  59. +1 −1 examples/manual-mocks/__mocks__/lodash.js
  60. +1 −1 examples/manual-mocks/models/__mocks__/user.js
  61. +1 −1 examples/module-mock/__tests__/partial_mock.js
  62. +0 −2 jest.config.js
  63. +0 −25 karma.conf.js
  64. +1 −1 lerna.json
  65. +12 −24 package.json
  66. +6 −13 packages/babel-jest/package.json
  67. +18 −0 packages/babel-jest/src/__tests__/index.ts
  68. +2 −1 packages/babel-jest/src/index.ts
  69. +2 −9 packages/babel-plugin-jest-hoist/package.json
  70. +3 −3 packages/babel-preset-jest/package.json
  71. +2 −9 packages/diff-sequences/package.json
  72. +2 −2 packages/eslint-config-fb-strict/package.json
  73. +9 −17 packages/expect/package.json
  74. +2 −2 packages/expect/src/__tests__/__snapshots__/matchers.test.js.snap
  75. +8 −2 packages/expect/src/extractExpectedAssertionsErrors.ts
  76. +4 −11 packages/jest-changed-files/package.json
  77. +19 −24 packages/jest-circus/package.json
  78. +51 −18 packages/jest-circus/src/eventHandler.ts
  79. +5 −2 packages/jest-circus/src/formatNodeAssertErrors.ts
  80. +11 −3 packages/jest-circus/src/legacy-code-todo-rewrite/jestAdapter.ts
  81. +27 −16 packages/jest-circus/src/run.ts
  82. +2 −1 packages/jest-circus/src/state.ts
  83. +122 −80 packages/jest-circus/src/utils.ts
  84. +10 −18 packages/jest-cli/package.json
  85. +2 −3 packages/jest-cli/src/cli/index.ts
  86. +0 −3 packages/jest-cli/src/init/__tests__/__snapshots__/init.test.js.snap
  87. +2 −2 packages/jest-cli/src/init/index.ts
  88. +15 −23 packages/jest-config/package.json
  89. +0 −2 packages/jest-config/src/Defaults.ts
  90. +8 −0 packages/jest-config/src/Deprecated.ts
  91. +0 −1 packages/jest-config/src/Descriptions.ts
  92. +0 −2 packages/jest-config/src/ValidConfig.ts
  93. +1 −1 packages/jest-config/src/__mocks__/fs.js
  94. +1 −1 packages/jest-config/src/__mocks__/os.js
  95. +0 −2 packages/jest-config/src/__tests__/Defaults.test.ts
  96. +0 −14 packages/jest-config/src/__tests__/normalize.test.js
  97. +0 −2 packages/jest-config/src/__tests__/readConfig.test.ts
  98. +0 −2 packages/jest-config/src/__tests__/readConfigs.test.ts
  99. +4 −3 packages/jest-config/src/getCacheDirectory.ts
  100. +0 −14 packages/jest-config/src/importEsm.ts
  101. +2 −3 packages/jest-config/src/index.ts
  102. +3 −5 packages/jest-config/src/normalize.ts
  103. +5 −2 packages/jest-config/src/readConfigFileAndSetRootDir.ts
  104. +6 −13 packages/jest-console/package.json
  105. +2 −2 packages/jest-console/src/BufferedConsole.ts
  106. +3 −4 packages/jest-console/src/CustomConsole.ts
  107. +22 −30 packages/jest-core/package.json
  108. +0 −2 packages/jest-core/src/__tests__/SearchSource.test.ts
  109. +1 −4 packages/jest-core/src/lib/__tests__/__snapshots__/log_debug_messages.test.ts.snap
  110. +1 −1 packages/jest-core/src/lib/active_filters_message.ts
  111. +3 −3 packages/jest-core/src/plugins/quit.ts
  112. +8 −3 packages/jest-core/src/plugins/test_name_pattern.ts
  113. +8 −3 packages/jest-core/src/plugins/test_path_pattern.ts
  114. +3 −2 packages/jest-core/src/plugins/update_snapshots.ts
  115. +5 −8 packages/jest-core/src/plugins/update_snapshots_interactive.ts
  116. +2 −3 packages/jest-core/src/runJest.ts
  117. +7 −14 packages/jest-diff/package.json
  118. +1 −0 packages/jest-diff/src/index.ts
  119. +2 −9 packages/jest-docblock/package.json
  120. +7 −14 packages/jest-each/package.json
  121. +4 −2 packages/jest-each/src/index.ts
  122. +9 −16 packages/jest-environment-jsdom/package.json
  123. +1 −1 packages/jest-environment-jsdom/src/__mocks__/index.ts
  124. +2 −2 packages/jest-environment-jsdom/src/__tests__/jsdom_environment.test.ts
  125. +19 −11 packages/jest-environment-jsdom/src/index.ts
  126. +7 −18 packages/jest-environment-node/package.json
  127. +2 −2 packages/jest-environment-node/src/__tests__/node_environment.test.ts
  128. +6 −17 packages/jest-environment-node/src/index.ts
  129. +5 −12 packages/jest-environment/package.json
  130. +29 −11 packages/jest-environment/src/index.ts
  131. +9 −16 packages/jest-fake-timers/package.json
  132. 0 ...-timers/src/__tests__/__snapshots__/{jestFakeTimers.test.ts.snap → legacyFakeTimers.test.ts.snap}
  133. 0 ...timers/src/__tests__/__snapshots__/{fakeTimersLolex.test.ts.snap → modernFakeTimers.test.ts.snap}
  134. +1 −1 packages/jest-fake-timers/src/__tests__/{jestFakeTimers.test.ts → legacyFakeTimers.test.ts}
  135. +2 −2 packages/jest-fake-timers/src/__tests__/{fakeTimersLolex.test.ts → modernFakeTimers.test.ts}
  136. +2 −2 packages/jest-fake-timers/src/index.ts
  137. 0 packages/jest-fake-timers/src/{jestFakeTimers.ts → legacyFakeTimers.ts}
  138. +9 −9 packages/jest-fake-timers/src/{FakeTimersLolex.ts → modernFakeTimers.ts}
  139. +2 −9 packages/jest-get-type/package.json
  140. +5 −12 packages/jest-globals/package.json
  141. +14 −14 packages/jest-globals/src/index.ts
  142. +7 −14 packages/jest-haste-map/package.json
  143. +0 −30 packages/jest-haste-map/src/__tests__/index.test.js
  144. +1 −1 packages/jest-haste-map/src/__tests__/worker.test.js
  145. +1 −1 packages/jest-haste-map/src/getMockName.ts
  146. +15 −50 packages/jest-haste-map/src/index.ts
  147. +20 −40 packages/jest-haste-map/src/lib/__tests__/dependencyExtractor.test.js
  148. +1 −2 packages/jest-haste-map/src/lib/dependencyExtractor.ts
  149. +3 −2 packages/jest-haste-map/src/lib/normalizePathSep.ts
  150. +15 −22 packages/jest-jasmine2/package.json
  151. +1 −1 packages/jest-jasmine2/src/__tests__/queueRunner.test.ts
  152. +1 −1 packages/jest-jasmine2/src/assertionErrorMessage.ts
  153. +4 −2 packages/jest-jasmine2/src/index.ts
  154. +3 −2 packages/jest-jasmine2/src/queueRunner.ts
  155. +5 −5 packages/jest-jasmine2/src/treeProcessor.ts
  156. +4 −11 packages/jest-leak-detector/package.json
  157. +7 −14 packages/jest-matcher-utils/package.json
  158. +5 −12 packages/jest-message-util/package.json
  159. +0 −1 packages/jest-message-util/src/__tests__/__snapshots__/messages.test.ts.snap
  160. +3 −11 packages/jest-mock/package.json
  161. +20 −2 packages/jest-phabricator/README.md
  162. +3 −10 packages/jest-phabricator/package.json
  163. +2 −9 packages/jest-regex-util/package.json
  164. +8 −2 packages/jest-regex-util/src/__tests__/index.test.ts
  165. +8 −15 packages/jest-repl/package.json
  166. +13 −20 packages/jest-reporters/package.json
  167. +4 −4 packages/jest-reporters/src/__tests__/__snapshots__/summary_reporter.test.js.snap
  168. +1 −1 packages/jest-reporters/src/__tests__/coverage_reporter.test.js
  169. +2 −1 packages/jest-reporters/src/get_result_header.ts
  170. +4 −4 packages/jest-reporters/src/utils.ts
  171. +4 −2 packages/jest-reporters/src/verbose_reporter.ts
  172. +8 −15 packages/jest-resolve-dependencies/package.json
  173. +6 −15 packages/jest-resolve/package.json
  174. +5 −2 packages/jest-resolve/src/__tests__/resolve.test.ts
  175. +3 −16 packages/jest-resolve/src/defaultResolver.ts
  176. +7 −9 packages/jest-resolve/src/index.ts
  177. +2 −2 packages/jest-resolve/src/nodeModulesPaths.ts
  178. +0 −1 packages/jest-resolve/src/types.ts
  179. +18 −25 packages/jest-runner/package.json
  180. +2 −4 packages/jest-runner/src/runTest.ts
  181. +23 −30 packages/jest-runtime/package.json
  182. +0 −43 packages/jest-runtime/src/__tests__/resolve_browser.test.js
  183. +5 −5 ...me/src/__tests__/{runtime_gen_mock_from_module.test.js → runtime_create_mock_from_module.test.js}
  184. +0 −16 packages/jest-runtime/src/__tests__/runtime_require_module.test.js
  185. 0 .../__tests__/test_root/{mapped_module_genMockFromModule.js → mapped_module_createMockFromModule.js}
  186. +2 −3 packages/jest-runtime/src/cli/index.ts
  187. +86 −70 packages/jest-runtime/src/index.ts
  188. +1 −0 packages/jest-runtime/tsconfig.json
  189. +2 −9 packages/jest-serializer/package.json
  190. +16 −23 packages/jest-snapshot/package.json
  191. +1 −1 packages/jest-snapshot/src/__tests__/inline_snapshots.test.ts
  192. +1 −1 packages/jest-snapshot/src/__tests__/utils.test.ts
  193. +2 −9 packages/jest-source-map/package.json
  194. +1 −1 packages/jest-source-map/src/__tests__/getCallsite.test.ts
  195. +4 −11 packages/jest-test-result/package.json
  196. +6 −13 packages/jest-test-sequencer/package.json
  197. +1 −1 packages/jest-test-sequencer/src/__tests__/test_sequencer.test.js
  198. +7 −15 packages/jest-transform/package.json
  199. +7 −11 packages/jest-transform/src/ScriptTransformer.ts
  200. +3 −6 packages/jest-transform/src/__tests__/__snapshots__/script_transformer.test.js.snap
  201. +7 −2 packages/jest-transform/src/__tests__/script_transformer.test.js
  202. +1 −4 packages/jest-transform/src/types.ts
  203. +3 −10 packages/jest-types/package.json
  204. +6 −4 packages/jest-types/src/Circus.ts
  205. +1 −6 packages/jest-types/src/Config.ts
  206. +4 −5 packages/jest-types/src/Global.ts
  207. +4 −11 packages/jest-util/package.json
  208. +52 −0 packages/jest-util/src/__tests__/formatTime.test.ts
  209. +22 −0 packages/jest-util/src/formatTime.ts
  210. +2 −0 packages/jest-util/src/index.ts
  211. +21 −0 packages/jest-util/src/tryRealpath.ts
  212. +7 −14 packages/jest-validate/package.json
  213. +1 −6 packages/jest-validate/src/__tests__/__snapshots__/validate.test.ts.snap
  214. +2 −6 packages/jest-validate/src/__tests__/fixtures/jestConfig.ts
  215. +2 −2 packages/jest-validate/src/__tests__/validate.test.ts
  216. +4 −1 packages/jest-validate/src/validate.ts
  217. +1 −1 packages/jest-validate/src/validateCLIOptions.ts
  218. +7 −14 packages/jest-watcher/package.json
  219. +2 −2 packages/jest-watcher/src/BaseWatchPlugin.ts
  220. +2 −2 packages/jest-watcher/src/JestHooks.ts
  221. +2 −9 packages/jest-worker/package.json
  222. +4 −11 packages/jest/package.json
  223. +4 −11 packages/pretty-format/package.json
  224. +4 −3 packages/pretty-format/perf/test.js
  225. +4 −11 packages/test-utils/package.json
  226. +0 −87 scripts/browserBuild.js
  227. +0 −39 scripts/build.js
  228. +7 −36 scripts/buildTs.js
  229. +1 −1 scripts/verifyOldTs.js
  230. +2 −4 tsconfig.json
  231. +1 −1 website/blog/2016-03-11-javascript-unit-testing-performance.md
  232. +1 −1 website/blog/2016-04-12-jest-11.md
  233. +1 −1 website/blog/2016-06-22-jest-13.md
  234. +1 −1 website/blog/2016-07-27-jest-14.md
  235. +1 −1 website/blog/2016-09-01-jest-15.md
  236. +1 −1 website/blog/2016-10-03-jest-16.md
  237. +1 −1 website/blog/2016-12-15-2016-in-jest.md
  238. +1 −1 website/blog/2017-05-06-jest-20-delightful-testing-multi-project-runner.md
  239. +1 −0 website/pages/en/index.js
  240. +2 −2 website/versioned_docs/version-22.x/Configuration.md
  241. +0 −19 website/versioned_docs/version-22.x/TutorialReactNative.md
  242. +2 −2 website/versioned_docs/version-23.x/Configuration.md
  243. +11 −2 website/versioned_docs/version-24.x/Configuration.md
  244. +2 −2 website/versioned_docs/version-25.1/Configuration.md
  245. +5 −1 website/versioned_docs/version-25.1/TestingFrameworks.md
  246. +2 −2 website/versioned_docs/version-25.3/Configuration.md
  247. +11 −2 website/versioned_docs/version-25.5/Configuration.md
  248. +1,352 −1,937 yarn.lock
31 changes: 1 addition & 30 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -18,22 +18,6 @@ aliases:

version: 2
jobs:
test-node-8:
working_directory: ~/jest
docker:
- image: circleci/node:8
steps:
- checkout
- run:
command: yarn remove-prettier-dep
- restore-cache: *restore-cache
- run: *install
- save-cache: *save-cache
- run:
command: yarn test-ci-partial
- store_test_results:
path: reports/junit

test-node-10:
working_directory: ~/jest
docker:
@@ -58,7 +42,7 @@ jobs:
- run: *install
- save-cache: *save-cache
- run:
command: JEST_CIRCUS=1 yarn test-ci-partial
command: JEST_CIRCUS=1 yarn test-ci-partial && JEST_CIRCUS=1 yarn test-leak
- store_test_results:
path: reports/junit

@@ -104,17 +88,6 @@ jobs:
- store_test_results:
path: reports/junit

test-browser:
working_directory: ~/jest
docker:
- image: circleci/node:12-browsers
steps:
- checkout
- restore-cache: *restore-cache
- run: *install
- save-cache: *save-cache
- run: yarn test-ci-es5-build-in-browser

test-or-deploy-website:
working_directory: ~/jest
docker:
@@ -134,12 +107,10 @@ workflows:
version: 2
build-and-deploy:
jobs:
- test-node-8
- test-node-10
- test-node-12
- test-node-13
- test-node-14 # current
- test-jest-circus
- test-browser
- test-or-deploy-website:
filters: *filter-ignore-gh-pages
1 change: 0 additions & 1 deletion .eslintignore
Original file line number Diff line number Diff line change
@@ -3,7 +3,6 @@
bin/
flow-typed/**
packages/*/build/**
packages/*/build-es5/**
packages/jest-diff/src/cleanupSemantic.ts
website/blog
website/build
1 change: 0 additions & 1 deletion .eslintrc.js
Original file line number Diff line number Diff line change
@@ -95,7 +95,6 @@ module.exports = {
files: [
'packages/jest-jasmine2/src/jasmine/**/*',
'packages/expect/src/jasmineUtils.ts',
'e2e/browser-support/browserTest.js',
'**/vendor/**/*',
],
rules: {
10 changes: 2 additions & 8 deletions .github/workflows/nodejs.yml
Original file line number Diff line number Diff line change
@@ -41,12 +41,10 @@ jobs:
run: node scripts/build.js
- name: run tsc
run: yarn build:ts
- name: verify ts 3.4 compatibility
- name: verify TypeScript@3.8 compatibility
run: yarn verify-old-ts
- name: run eslint
run: yarn lint
- name: run eslint on browser builds
run: yarn lint-es5-build
- name: run prettier
run: yarn lint:prettier:ci
- name: check copyright headers
@@ -56,8 +54,7 @@ jobs:
strategy:
fail-fast: false
matrix:
# https://github.com/actions/setup-node/issues/27
node-version: [8.17.0, 10.x, 12.x, 13.x, 14.x]
node-version: [10.x, 12.x, 13.x, 14.x]
os: [ubuntu-latest, macOS-latest, windows-latest]
runs-on: ${{ matrix.os }}

@@ -82,9 +79,6 @@ jobs:
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- name: remove prettier dep
run: yarn remove-prettier-dep
if: matrix.node-version == '8.17.0'
- name: install
run: yarn install-no-ts-build
- name: run tests
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -17,7 +17,6 @@
/node_modules

/packages/*/build/
/packages/*/build-es5/
/packages/*/coverage/
/packages/*/node_modules/
/packages/*/package-lock.json
57 changes: 57 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -8,6 +8,63 @@

### Performance

## 26.0.0

### Features

- `[jest-environment-jsdom]` [**BREAKING**] Upgrade `jsdom` to v16 ([#9606](https://github.com/facebook/jest/pull/9606))
- `[@jest/fake-timers]` Add possibility to use a modern implementation of fake timers, backed by `@sinonjs/fake-timers` ([#7776](https://github.com/facebook/jest/pull/7776))
- `[jest-runtime]` Add `createMockFromModule` as an alias for `genMockFromModule` ([#9962](https://github.com/facebook/jest/pull/9962))

### Fixes

- `[babel-jest]` Handle `null` being passed to `createTransformer` ([#9955](https://github.com/facebook/jest/pull/9955))
- `[jest-circus, jest-console, jest-jasmine2, jest-reporters, jest-util, pretty-format]` Fix time durating formatting and consolidate time formatting code ([#9765](https://github.com/facebook/jest/pull/9765))
- `[jest-circus]` [**BREAKING**] Fail tests if a test takes a done callback and have return values ([#9129](https://github.com/facebook/jest/pull/9129))
- `[jest-circus]` [**BREAKING**] Throw a proper error if a test / hook is defined asynchronously ([#8096](https://github.com/facebook/jest/pull/8096))
- `[jest-circus]` Throw more descriptive error if hook is defined inside test ([#9957](https://github.com/facebook/jest/pull/9957))
- `[jest-circus]` [**BREAKING**] Align execution order of tests to match `jasmine`'s top to bottom order ([#9965](https://github.com/facebook/jest/pull/9965))
- `[jest-config, jest-resolve]` [**BREAKING**] Remove support for `browser` field ([#9943](https://github.com/facebook/jest/pull/9943))
- `[jest-haste-map]` Stop reporting files as changed when they are only accessed ([#7347](https://github.com/facebook/jest/pull/7347))
- `[jest-resolve]` Show relative path from root dir for `module not found` errors ([#9963](https://github.com/facebook/jest/pull/9963))
- `[jest-runtime]` Fix absolute path moduleNameMapper + jest.mock bug ([#8727](https://github.com/facebook/jest/pull/8727))

### Chore & Maintenance

- `[*]` [**BREAKING**] TypeScript definitions requires a minimum of TypeScript v3.8 ([#9823](https://github.com/facebook/jest/pull/9823))
- `[*]` [**BREAKING**] Drop support for Node 8 ([#9423](https://github.com/facebook/jest/pull/9423))
- `[*]` Upgrade to chalk@4 ([#9752](https://github.com/facebook/jest/pull/9752))
- `[*]` Remove usage of `realpath-native` ([#9952](https://github.com/facebook/jest/pull/9952))
- `[docs]` Fix example reference implementation to use Jest with Phabricator ([#8662](https://github.com/facebook/jest/pull/8662))
- `[docs]` Added default compiler to tranform ([#8583](https://github.com/facebook/jest/pull/8583))
- `[docs]` Updated Testing Frameworks guide with React; make it generic ([#9106](https://github.com/facebook/jest/pull/9106))
- `[expect, jest-mock, pretty-format]` [**BREAKING**] Remove `build-es5` from package ([#9945](https://github.com/facebook/jest/pull/9945))
- `[@jest/fake-timers, @jest/environment]` [**BREAKING**] Rename `LolexFakeTimers` to `ModernFakeTimers` ([#9960](https://github.com/facebook/jest/pull/9960))
- `[jest-haste-map]` [**BREAKING**] removed `providesModuleNodeModules` ([#8535](https://github.com/facebook/jest/pull/8535))
- `[jest-runtime]` [**BREAKING**] Remove long-deprecated `require.requireActual` and `require.requireMock` methods ([#9854](https://github.com/facebook/jest/pull/9854))

## 25.5.4

### Fixes

- `[jest-jasmine2]` Don't run `beforeAll` / `afterAll` in skipped describe blocks ([#9931](https://github.com/facebook/jest/pull/9931))

### Chore & Maintenance

- `[jest-runtime]` Do not warn when mutating `require.cache` ([#9946](https://github.com/facebook/jest/pull/9946))

## 25.5.3

### Chore & Maintenance

- `[jest-circus]` Fix memory leak when running in band ([#9934](https://github.com/facebook/jest/pull/9934))

## 25.5.2

### Fixes

- `[jest-globals]` Export globals as values, not types ([#9925](https://github.com/facebook/jest/pull/9925))

## 25.5.1

### Fixes
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -117,7 +117,7 @@ PASS __tests__/clear_cache.test.js
Test Suites: 1 passed, 1 total
Tests: 1 passed, 1 total
Snapshots: 0 total
Time: 0.232s, estimated 1s
Time: 0.232 s, estimated 1 s
Ran all test suites.
```

5 changes: 1 addition & 4 deletions TestUtils.ts
Original file line number Diff line number Diff line change
@@ -67,7 +67,6 @@ const DEFAULT_GLOBAL_CONFIG: Config.GlobalConfig = {

const DEFAULT_PROJECT_CONFIG: Config.ProjectConfig = {
automock: false,
browser: false,
cache: false,
cacheDirectory: '/test_cache_dir/',
clearMocks: false,
@@ -83,9 +82,7 @@ const DEFAULT_PROJECT_CONFIG: Config.ProjectConfig = {
globalSetup: null,
globalTeardown: null,
globals: {},
haste: {
providesModuleNodeModules: [],
},
haste: {},
moduleDirectories: [],
moduleFileExtensions: ['js'],
moduleLoader: '/test_module_loader_path',
2 changes: 1 addition & 1 deletion babel.config.js
Original file line number Diff line number Diff line change
@@ -40,7 +40,7 @@ module.exports = {
},
],
],
test: 'packages/jest-config/src/importEsm.ts',
test: 'packages/jest-config/src/readConfigFileAndSetRootDir.ts',
},
],
plugins: [
6 changes: 1 addition & 5 deletions docs/CLI.md
Original file line number Diff line number Diff line change
@@ -156,11 +156,7 @@ Alias: `--collectCoverage`. Indicates that test coverage information should be c

Indicates which provider should be used to instrument code for coverage. Allowed values are `babel` (default) or `v8`.

Note that using `v8` is considered experimental. This uses V8's builtin code coverage rather than one based on Babel and comes with a few caveats

1. Your node version must include `vm.compileFunction`, which was introduced in [node 10.10](https://nodejs.org/dist/latest-v12.x/docs/api/vm.html#vm_vm_compilefunction_code_params_options)
1. Tests needs to run in Node test environment (support for `jsdom` requires [`jest-environment-jsdom-sixteen`](https://www.npmjs.com/package/jest-environment-jsdom-sixteen))
1. V8 has way better data in the later versions, so using the latest versions of node (v13 at the time of this writing) will yield better results
Note that using `v8` is considered experimental. This uses V8's builtin code coverage rather than one based on Babel. It is not as well tested, and it has also improved in the last few releases of Node. Using the latest versions of node (v14 at the time of this writing) will yield better results.

### `--debug`

43 changes: 27 additions & 16 deletions docs/Configuration.md
Original file line number Diff line number Diff line change
@@ -105,12 +105,6 @@ Default: `0`

By default, Jest runs all tests and produces all errors into the console upon completion. The bail config option can be used here to have Jest stop running tests after `n` failures. Setting bail to `true` is the same as setting bail to `1`.

### `browser` [boolean]

Default: `false`

Respect Browserify's [`"browser"` field](https://github.com/substack/browserify-handbook#browser-field) in `package.json` when resolving modules. Some modules export different versions based on whether they are operating in Node or a browser.

### `cacheDirectory` [string]

Default: `"/tmp/<path>"`
@@ -189,11 +183,7 @@ These pattern strings match against the full path. Use the `<rootDir>` string to

Indicates which provider should be used to instrument code for coverage. Allowed values are `babel` (default) or `v8`.

Note that using `v8` is considered experimental. This uses V8's builtin code coverage rather than one based on Babel and comes with a few caveats

1. Your node version must include `vm.compileFunction`, which was introduced in [node 10.10](https://nodejs.org/dist/latest-v12.x/docs/api/vm.html#vm_vm_compilefunction_code_params_options)
1. Tests needs to run in Node test environment (support for `jsdom` requires [`jest-environment-jsdom-sixteen`](https://www.npmjs.com/package/jest-environment-jsdom-sixteen))
1. V8 has way better data in the later versions, so using the latest versions of node (v13 at the time of this writing) will yield better results
Note that using `v8` is considered experimental. This uses V8's builtin code coverage rather than one based on Babel. It is not as well tested, and it has also improved in the last few releases of Node. Using the latest versions of node (v14 at the time of this writing) will yield better results.

### `coverageReporters` [array\<string | [string,any]>]

@@ -689,7 +679,6 @@ This option allows the use of a custom resolver. This resolver must be a node mo
```json
{
"basedir": string,
"browser": bool,
"defaultResolver": "function(request, options)",
"extensions": [string],
"moduleDirectory": [string],
@@ -700,7 +689,18 @@ This option allows the use of a custom resolver. This resolver must be a node mo

The function should either return a path to the module that should be resolved or throw an error if the module can't be found.

Note: the defaultResolver passed as options is the jest default resolver which might be useful when you write your custom one. It takes the same arguments as your custom one, e.g. (request, options).
Note: the defaultResolver passed as options is the Jest default resolver which might be useful when you write your custom one. It takes the same arguments as your custom one, e.g. `(request, options)`.

For example, if you want to respect Browserify's [`"browser"` field](https://github.com/browserify/browserify-handbook/blob/master/readme.markdown#browser-field), you can use the following configuration:

```json
{
...
"jest": {
"resolver": "browser-resolve"
}
}
```

### `restoreMocks` [boolean]

@@ -1085,6 +1085,7 @@ Example:
Sort test path alphabetically.

```js
// testSequencer.js
const Sequencer = require('@jest/test-sequencer').default;

class CustomSequencer extends Sequencer {
@@ -1099,6 +1100,14 @@ class CustomSequencer extends Sequencer {
module.exports = CustomSequencer;
```

Use it in your Jest config file like this:

```json
{
"testSequencer": "path/to/testSequencer.js"
}
```

### `testTimeout` [number]

Default: `5000`
@@ -1115,11 +1124,13 @@ This option sets the URL for the jsdom environment. It is reflected in propertie

Default: `real`

Setting this value to `fake` allows the use of fake timers for functions such as `setTimeout`. Fake timers are useful when a piece of code sets a long timeout that we don't want to wait for in a test.
Setting this value to `legacy` or `fake` allows the use of fake timers for functions such as `setTimeout`. Fake timers are useful when a piece of code sets a long timeout that we don't want to wait for in a test.

If the value is `modern`, [`@sinonjs/fake-timers`](https://github.com/sinonjs/fake-timers) will be used as implementation instead of Jest's own legacy implementation. This will be the default fake implementation in Jest 27.

### `transform` [object\<string, pathToTransformer | [pathToTransformer, object]>]

Default: `undefined`
Default: `{"^.+\\.[jt]sx?$": "babel-jest"}`

A map from regular expressions to paths to transformers. A transformer is a module that provides a synchronous function for transforming source files. For example, if you wanted to be able to use a new language feature in your modules or tests that isn't yet supported by node, you might plug in one of many compilers that compile a future version of JavaScript to a current one. Example: see the [examples/typescript](https://github.com/facebook/jest/blob/master/examples/typescript/package.json#L16) example or the [webpack tutorial](Webpack.md).

@@ -1134,7 +1145,7 @@ You can pass configuration to a transformer like `{filePattern: ['path-to-transf

_Note: a transformer is only run once per file unless the file has changed. During development of a transformer it can be useful to run Jest with `--no-cache` to frequently [delete Jest's cache](Troubleshooting.md#caching-issues)._

_Note: if you are using the `babel-jest` transformer and want to use an additional code preprocessor, keep in mind that when "transform" is overwritten in any way the `babel-jest` is not loaded automatically anymore. If you want to use it to compile JavaScript code it has to be explicitly defined. See [babel-jest plugin](https://github.com/facebook/jest/tree/master/packages/babel-jest#setup)_
_Note: when adding additional code transformers, this will overwrite the default config and `babel-jest` is no longer automatically loaded. If you want to use it to compile JavaScript or Typescript, it has to be explicitly defined by adding `{"^.+\\.[jt]sx?$": "babel-jest"}` to the transform property. See [babel-jest plugin](https://github.com/facebook/jest/tree/master/packages/babel-jest#setup)_

### `transformIgnorePatterns` [array\<string>]

Loading