Commit Graph

36 Commits

Author SHA1 Message Date
Simen Bekkhus 2ddc4305ca
chore: errors should be named as such (#14817) 2023-12-30 11:05:52 +00:00
Simen Bekkhus 306a70aef8
chore: access Number globals via `Number` (#14807) 2023-12-30 00:46:34 +00:00
Simen Bekkhus 14cfdae1e1
chore: simpler string trimming (#14798) 2023-12-28 18:22:15 +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 8219820a87
chore(lint): use `jest/prefer-to-be` rule (#13369) 2022-10-03 14:07:11 +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 a20bd2c31e
chore: activate `prefer-template` eslint rule (#12513) 2022-02-28 11:31:57 +01:00
Simen Bekkhus 1c2011dbce
chore: verify all packages have the same engine requirement (#9871) 2020-04-23 20:19: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
Simen Bekkhus 993bc5c5f2
chore: upgrade prettier (#7336) 2018-11-19 15:46:34 +01:00
Rubén Norte a91ea0ea2b
Add missing copyright headers and code of conduct (#7221)
* Add CODE_OF_CONDUCT.md

* Add Facebook copyright headers

* Replace inlined text with snapshot in detect open handles test
2018-10-23 17:57:23 +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
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
Christoph Pojer 7b6597fefa Prettier 1.3 (#3444)
* Add support for `jest.config.js`.

* Update to Prettier 1.3.0.
2017-05-03 07:55:58 +01:00
Robin Pokorný 5749d38e06 Update promise docs (#3201)
* Update docs on promises

* Remove promises from `expect.assertions` and `test`

* Keep docs for promise return

* Update async docs

* Update the async tutorial

* Nicer headlines in Testing Async code

* Update TestingAsyncCode.md

* Update TutorialAsync.md
2017-05-02 13:56:02 +01:00
Eric Nakagawa 005ac8c9e4 Resolve issues relating to 4-spaces, add crowdin-cli (#3369)
Adding additional settings to prettier.js to catch unformatted files in packages/*

Running 'yarn prettier'
2017-04-26 10:19:38 +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
Dmitrii Abramov 510951465a native-async-module integration test (#3224) 2017-03-28 18:43:18 -07:00
Michał Pierzchała 60b41399ea Support mocking native async methods (#3209)
* Support mocking native AsyncFunction

* Add native-async-mock example test

* Use strict

* Return a promise from mock

* Only test async

* Revert returning promise
2017-03-27 11:51:55 -07:00
Michał Pierzchała e08c81e18b Replace babel-polyfill with only regenerator-runtime (#2755) 2017-02-27 10:26:36 +00:00
Vladimir Danchenkov 61b665ef25 fix async examples (#2808) 2017-02-05 18:22:29 +00:00
Michał Pierzchała 8fc57da6c7 Rename jest-cli to jest in examples (#2379) 2016-12-20 16:27:29 +00:00
frevib 16b88061d1 Fixed version issues with examples/async (#2268)
* Fixed version issues with examples/async

* Changed to babel-jest, jest-cli to latest in package.json
2016-12-12 11:53:43 +01:00
Christoph Pojer d378c2ce4d Update user-test.js 2016-11-16 13:35:26 +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
Dmitrii Abramov 644a512d4e Allow `it` to return <Promise>
Summary:
to review: `jest-utils/jasmine-pit` and `__integration_tests_/promise_it/**`

It does not work with jasmine1 yet. If the direction is ok i'll add jasmine1 support to this PR.
Closes https://github.com/facebook/jest/pull/970

Reviewed By: dmitriiabramov

Differential Revision: D3309064

fbshipit-source-id: ff597945554e8cad4f2add8232236429810a966c
2016-05-16 22:15:47 -07:00
cpojer 1d778a1ecc Fix async example for the website.
Summary:
Fixes #960.
Closes https://github.com/facebook/jest/pull/961

Differential Revision: D3240784

fb-gh-sync-id: ad740f495fe1b5eb4271fc4d42105e6b231dcc32
fbshipit-source-id: ad740f495fe1b5eb4271fc4d42105e6b231dcc32
2016-04-29 06:25:59 -07:00
iamchenxin 60506b767b Add async error test for promise and async/await
Summary:
I test many times,seems there isnt a suitable  way to use Jasmine's `toThrow style` to test `async error`.
So i add some codes to illustrate using standard javascript style to test async error .
Do there have a `toThrow` version test ? I can not make a suitable `toThrow` test. if there is,should add both of those illustration codes.
Closes https://github.com/facebook/jest/pull/903

Differential Revision: D3229173

fb-gh-sync-id: b2540733d83c3bc2c1438936519c656c86c35ea9
fbshipit-source-id: b2540733d83c3bc2c1438936519c656c86c35ea9
2016-04-27 00:25:06 -07: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
cpojer 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