Commit Graph

27 Commits

Author SHA1 Message Date
Simen Bekkhus 6c83c0f91d
chore: use numeric separators (#14570) 2023-09-25 21:36:31 +00:00
Simen Bekkhus d6baacfe74
feat: Refer to specific versions of Jest monorepo dependencies instead of range (#14553) 2023-09-20 12:52:18 +00:00
Paul O’Shannessy 6d2632adae
Update copyrights with Meta Platforms, restore original license in Jasmine fork (#13879) 2023-02-09 08:13:08 +01:00
Tom Mrazauskas 5da3402c70
chore(lint): use `jest/no-alias-methods` rule (#13371) 2022-10-03 17:00:53 +02:00
Bryan Mishkin 818b36b89a
chore: fix inconsistent workspace prefixes (#13217) 2022-09-08 11:29:38 +02:00
Feng Yu ccecdaeaae
Enforce same version of a dependency (#12668) 2022-04-19 12:48:43 +02:00
Simen Bekkhus e3edc47d86
chore: use `globalThis` over `global` everywhere (#12447) 2022-02-21 12:58:26 +01:00
Simen Bekkhus 9279a3a97a
feat: add fake timers implementation backed by Lolex (#8897) 2019-09-06 10:42:12 +02:00
Brian Donovan 70bd4978c5 docs: fix typo comment (#8916) 2019-09-05 21:32:29 +02:00
Michał Pierzchała 64b3a9b72b
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 Bekkhus 1818d84b2c
Migrate to Babel 7 (#7016) 2018-12-18 10:28:03 +01:00
Michał Pierzchała d1ce3cd013 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ła f0b12711bd 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
Jack Lewin 688fba7fe2 Add advanceTimersByTime(), keep runTimersToTime() as alias (#4747)
* Rename runTimersToTime to advanceTimersByTime

* Make runTimersByTime an alias of advanceTimersByTime

* Update CHANGELOG.md

* Add version note in docs; fix CHANGELOG

* Fixed Flow errors for alias

* fix lint
2017-10-24 14:09:30 -07:00
anraka 21a2b7aaee Consistent naming of files (#3798) 2017-06-23 12:00:04 -07:00
mpontus 9b157c3a7c Audit @flow and "use strict" (#3451)
* Remove 'use strict' from all files

* 'use strict' removed from pacakges' sources
* Strict mode is now enabled automatically by babel
* 'use strict' check removed from dangerfile
* Updated contributing guidelines

* Enable @flow for most files

* Commit yarn.lock

* Revert removal of "use strict" in test and mock files

* Improve annotations for ReportDispatcher

* Replace "void 0" with "undefined"

* Update babel-plugin-transform-strict-mode to match transitive deps
2017-05-12 11:01:23 +01:00
Michał Pierzchała 8c2a65120a 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
Eric Nakagawa 3fc7e9251a 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ła 8fc57da6c7 Rename jest-cli to jest in examples (#2379) 2016-12-20 16:27:29 +00:00
Bob Renwick e5d4d337c4 expose runTimersToTime; add to docs; add example (#1806)
* expose runTimersToTime; add to docs; add example

* fix typo

* Update timerGame-test.js
2016-09-27 20:28:49 +09: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 Pojer 3bbf32a239 New defaults for Jest. (#1511) 2016-08-30 11:07:15 +01:00
cpojer 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
Dmitrii Abramov 3ec2df5196 Run tests for all packages and example projects
Summary: Closes https://github.com/facebook/jest/pull/822

Differential Revision: D3104247

fb-gh-sync-id: 4513775f0b824084b9ab1f730af73b31d758c39b
fbshipit-source-id: 4513775f0b824084b9ab1f730af73b31d758c39b
2016-03-28 10:56:27 -07:00
cpojer 81d6697617 New documentation and updated website and examples.
Summary:This gets Jest ready for 0.9.0.

What's new?
* Slightly refreshed look, based on the Relay website.
* New summary of what Jest is on the website.
* New Getting Started guide, with babel support and key feature explanation.
* Added a troubleshooting section.
* Updated all examples in the documentation.
* Added all new APIs to the API docs, updated everything to use `jest.fn()` instead of `jest.genMockFn()`.
* Removed the webpack alias and coffeescript guides. Neither of them are really supported or useful at this point. We can bring back a guide later on proper webpack integration if someone in the community takes this on. The webpack-alias feature is handled by the `moduleNameMapper` API.
* Added a link to the `Failed to get metadata` error in Jest.

See http://cpojer.github.io/jest/ for a preview.

In a follow-up I'll add a section on async testing for Promises and some more info about automocking.
Closes https://github.com/facebook/jest/pull/763

Reviewed By: yungsters

Differential Revision: D3005361

fb-gh-sync-id: f8e634cf4a311764f311f8b5849781b53975e686
shipit-source-id: f8e634cf4a311764f311f8b5849781b53975e686
2016-03-03 14:20:34 -08:00
cpojer 741f4a8de1 Cleanup and update examples in preparation for 0.9.0. 2016-02-25 17:14:18 +09:00
jeffmo 88a94d5d1b FIRST! 2014-05-14 09:42:01 -07:00