55 Commits
Author SHA1 Message Date
cpojer 25c51c35f0 Update deps. 2025-06-04 09:32:49 +09:00
cpojer cc74fbc3d7 Update deps. 2025-05-27 15:09:39 +09:00
Simen BekkhusandGitHub 0506062d5b feat: Refer to specific versions of Jest monorepo dependencies instead of range (#14553) 2023-09-20 12:52:18 +00:00
Simen BekkhusandGitHub bc43a33a3f fix(pretty-format): Handle empty string children in React same as react-test-renderer (#14470) 2023-09-19 13:16:01 +02:00
Paul O’ShannessyandGitHub c59a16287a Update copyrights with Meta Platforms, restore original license in Jasmine fork (#13879) 2023-02-09 08:13:08 +01:00
Simen BekkhusandGitHub 4eb8f5f38e chore: add some missing dev dependencies (#13837) 2023-01-28 17:20:27 +01:00
Simen BekkhusandGitHub 6710a5b74a chore: refresh lockfile (#13798) 2023-01-23 10:59:28 +01:00
Tom MrazauskasandGitHub d4c7197278 chore(lint): use jest/prefer-to-be rule (#13369) 2022-10-03 14:07:11 +02:00
Tom MrazauskasandGitHub 2d21c3e174 chore: remove lint exceptions for files in examples folder (#13346) 2022-10-01 08:01:13 +01:00
Bryan MishkinandGitHub 063b42b076 chore: fix inconsistent workspace prefixes (#13217) 2022-09-08 11:29:38 +02:00
Feng YuandGitHub 7c7dd01f5d Enforce same version of a dependency (#12668) 2022-04-19 12:48:43 +02:00
Nicolas CharpentierandGitHub 33447e8bf1 chore: update React examples to match with the new React guidelines (#12217) 2022-02-11 08:31:28 +01:00
Simen BekkhusandGitHub 3cdb79cb17 chore: get rid of warnings when running react tests (#11821) 2021-09-08 09:26:06 +02:00
Nicolas CharpentierandGitHub 7a43833156 docs: use function components in React examples (#11329) 2021-04-23 07:20:24 +02:00
Simen BekkhusandGitHub ba618b9d54 chore: default to node test env rather than browser (#9874) 2020-11-04 17:47:02 +01:00
Simen BekkhusandGitHub 72138a7edf chore: verify all packages have the same engine requirement (#9871) 2020-04-23 20:19:29 +02:00
Abhishek JainandSimen Bekkhus 2d3d02b3ef refactor: Replaces findDomNode() with refs (#9124) 2019-11-02 11:48:04 +01:00
ViniciusandSimen Bekkhus 5baf6cfde9 [React Test Example] Fixed babel to example tests (#8963) 2019-09-18 16:29:46 +02:00
Mark de DiosandSimen Bekkhus 6d78503ff8 chore: use property initializer syntax (#8117) 2019-03-14 17:05:09 +01:00
Simen BekkhusandGitHub 0539ee8046 Bump some dev dependency versions (#8044) 2019-03-04 18:55:52 +01:00
Michał PierzchałaandGitHub 281579b5ff chore(breaking): remove regenerator-runtime injection (#7595)
* feat: use @babel/plugin-transform-runtime instead of regenerator-runtime

* fix async example

* add changelog

* add babel/core and babel-jest to all examples

* fix native async test

* chore: dedupe lockfile

* remove babel from native transform test

* add test for async regenerator
2019-01-20 11:43:57 +01:00
Simen BekkhusandGitHub 34346ba9fc chore: remove unused eslint disable comments (#7640) 2019-01-16 18:46:27 +01:00
Simen BekkhusandGitHub 5def3a0858 Migrate to Babel 7 (#7016) 2018-12-18 10:28:03 +01:00
Terrence WongandRick Hanlon II e247e8ff4e Add react testing library example (#7346)
* docs: add react-testing-library example

* chore: rename test files to match comments in docs

* docs: show react-testing-library example first then enzyme
2018-11-09 18:48:40 +00:00
Michał PierzchałaandChristoph Nakazawa c479425ca8 chore: upgrade deps (#6400)
* chore: upgrade deps

* upgrade more packages

* upgrade micromatch

* use jest-junit as a reporter

* downgrade slash to 1.0.0 for now

* revert fbjs incompatible eslint plugins

* Revert eslint

* bring back eslint update because fbjs published new version:

* revert rn react upgrade

* update eslint-plugin-babel peerDep
2018-06-21 20:06:35 +01:00
Michał PierzchałaandChristoph Nakazawa 7d99ae51b5 Upgrade deps and include examples in workspaces (#6090)
* chore: bump deps

* remove snapshot that shouldn't be checked out

* include examples in workspaces

* mark examples as private

* move pretty-format dev deps to the package; remove enzyme from root pkg

* fix immutable entry
2018-04-30 10:00:08 +01:00
Rick Hanlon IIandChristoph Nakazawa ebc5de26d1 Update to React 16, handle React.Fragment better (#5816)
* Add React.Fragment to snapshots in unhandled cases

* Add test

* Upgrade to React 16

* Fix flow

* Convert to class component
2018-03-18 08:39:07 +00:00
anrakaandAaron Abramov c4fe26e7d1 Consistent naming of files (#3798) 2017-06-23 12:00:04 -07:00
Michał PierzchałaandChristoph Pojer d1579f05a8 Prettier 1.2.2, refactor runCommand (#3352)
* Prettier 1.2.2, refactor runCommand

* Fix test-examples

* Run prettier on examples and scripts

* Fix integration_tests

* Disable esilnt's computed-property-spacing
2017-04-25 16:16:08 +01:00
Christoph PojerandGitHub 4f8d9a1a78 Add all example dependencies to the top level. (#3313) 2017-04-18 11:01:08 -07:00
Eric NakagawaandChristoph Pojer 19cc8cf6c3 Updated examples to use updated Babel 'env' preset (#3303)
* Updating to use Babel env

Updating getting started

Updating enzyme to use babel 'env'

Updating jquery example to use babel 'env'

Updated manual_mocks example to use babel 'env'

Updated react test to use babel 'env'

Updated react-native to use babel 'env'

Update to use babel 'env'

Removed yarn.lock files

* * version

* * version

* * version

* * version

* Update .babelrc
2017-04-17 08:57:51 -07:00
Michał PierzchałaandChristoph Pojer 6bf3a12903 Replace babel-polyfill with only regenerator-runtime (#2755) 2017-02-27 10:26:36 +00:00
Michał PierzchałaandChristoph Pojer 6489edb0b3 Rename jest-cli to jest in examples (#2379) 2016-12-20 16:27:29 +00:00
Joe EganandChristoph Pojer 7c885f7749 Fix peerinvalid npm error in react example (#1616) 2016-09-05 13:25:44 -07:00
cpojer fed449c226 Changelog, get rid of describe in docs, fix thrown error printing, update new default error messages. 2016-08-31 19:02:14 +01:00
Christoph PojerandGitHub 3bbf32a239 New defaults for Jest. (#1511) 2016-08-30 11:07:15 +01:00
Christoph PojerandGitHub 25b8369291 Use vm.Script and refactor coverage caching. (#1239)
* Use `vm.Script`.

* Rewrite basic coverage support in Jest.

* Move `vm.Script` creation and caching into `transform`.

* Copy all jest packages into example folders.

This ensures we are using the latest version of every package.

* Cache the wrapped code.

* Use babel-jest for Jest itself; update setup.

* Added a transform.js test.
* Relax jest.mock babel transform restrictions.
* Updated package.json and .npmignore for all packages.

* Make watch script resilient to deleted files.
2016-07-07 16:43:12 +09:00
cpojer ff79d1920d Update snapshot example. 2016-06-29 13:51:27 +09:00
RichardandFacebook Github Bot 3 e4969781f8 Prevent examples from unintentionally un-mocking all react* modules
Summary:
As discussed in reactiflux, I've updated the examples and docs so similarly named modules will no longer be un-mocked by mistake.
Closes https://github.com/facebook/jest/pull/989

Differential Revision: D3288337

fbshipit-source-id: 1cc1220506050ae6b4fece24690902052be4c89e
2016-05-11 11:37:45 -07:00
Jason QuenseandFacebook Github Bot 0 b2d561861c no "use strict" in a es6 module context
Summary:
Since modules are strict by default its a bit odd. super tiny nit.
Closes https://github.com/facebook/jest/pull/958

Differential Revision: D3240744

fb-gh-sync-id: a8e32b3c22cad7b04ea10ff282d4b5dbd33d21b2
fbshipit-source-id: a8e32b3c22cad7b04ea10ff282d4b5dbd33d21b2
2016-04-29 05:46:21 -07:00
cpojerandFacebook Github Bot 6 40db699e8b Update eslint rules and clean up code.
Summary:We spend too much time reviewing minor nits and it increases turnaround time. This updates the eslint config to error on a few stylistic things and it is now aligned with the Jest code style.

This was also a good change (or well, I was forced :P ) to clean up the last of the cruft of the codebase :)
Closes https://github.com/facebook/jest/pull/892

Reviewed By: vjeux

Differential Revision: D3178752

fb-gh-sync-id: 7d1b759dffeca9374ecab39f7f031cf0da6832e3
fbshipit-source-id: 7d1b759dffeca9374ecab39f7f031cf0da6832e3
2016-04-14 20:31:28 -07:00
cpojerandFacebook Github Bot 2 1e41587778 Fix babel polyfill integration, add async tests and documentation.
Summary: Closes https://github.com/facebook/jest/pull/767

Differential Revision: D3014818

fb-gh-sync-id: 7da53151ddbe12fb2d9c28ed341503d07617e5cf
shipit-source-id: 7da53151ddbe12fb2d9c28ed341503d07617e5cf
2016-03-04 16:24:56 -08:00
cpojerandFacebook Github Bot 1 ecb57957a2 Add babel-jest into the repo
Summary:babel-jest is moving into jest as a package. This allows us to consolidate the codebase. Note that we are only re-using the npm package for babel-jest but the implementation actually changed as the `babel-preset-jest` is now being loaded automatically.

When `babel-jest` is installed in the project that jest is being run on, it will now automatically be loaded. See the `examples/react` folder – the only setup needed for babel to work is to enable the default presets (es2015 and react) and to `npm install babel-jest`. In this PR I also added the `setupFiles` config flag. There isn't really a reason to limit this to a single entry.
Closes https://github.com/facebook/jest/pull/757

Reviewed By: kentaromiura

Differential Revision: D2998065

fb-gh-sync-id: D2998065
shipit-source-id: D2998065
2016-03-01 22:37:04 -08:00
Jeff Carpenter 97950faad4 Typo fix bin -> bind 2016-02-26 17:16:11 -08:00
cpojer 741f4a8de1 Cleanup and update examples in preparation for 0.9.0. 2016-02-25 17:14:18 +09:00
drac bb43b4ed39 fix(react example): correct .babelrc and example
- in order to use 'babel-plugins-*' to parse the syntax, we can use
  'babel-preset-*' packages that we have already installed.
  for using 'babel-preset-*' packages you need to specify it in the
  .babelrc file as "presets".
  (Look here: https://babeljs.io/docs/plugins/#presets)

  otherwise if you want to use 'plugins' and parse the syntax;
  you have to install 'babel-plugin-*' packages.
  (Look here: https://babeljs.io/docs/plugins/)

- 'export default *' changed to 'module.exports = *' due to
  syntax error.
2015-11-17 14:37:00 +02:00
cpojer 410493a001 Add .babelrc to react example. 2015-11-16 13:48:02 -08:00
Matt Berg c16648ce07 Updated dependencies to include jest. 2015-10-23 15:04:01 -06:00
cpojer 2597a0b16e Remove react example and rename the react-es6 example 2015-10-23 11:36:44 -07:00
Chiedo e3b029b8d4 Updated testing docs 2015-10-14 14:51:56 -04:00