Commit Graph
40 Commits
Author SHA1 Message Date
Simen BekkhusandGitHub ba4ddd443a chore: errors should be named as such (#14817) 2023-12-30 11:05:52 +00:00
Simen BekkhusandGitHub e384da35df chore: simpler string trimming (#14798) 2023-12-28 18:22:15 +00:00
Frazer SmithandGitHub 757cc13538 chore: update jest repo organisation in urls (#14413) 2023-08-15 15:00:44 +02:00
Tom MrazauskasandGitHub d4c7197278 chore(lint): use jest/prefer-to-be rule (#13369) 2022-10-03 14:07:11 +02:00
Simen BekkhusandGitHub 3b5abdb8fd chore: activate prefer-template eslint rule (#12513) 2022-02-28 11:31:57 +01:00
Joshua ChenandGitHub 3592f6a331 docs: move codeblock title to props & use line highlight (#11991) 2021-10-24 10:01:50 +02:00
RickyandGitHub 8ef6ef0f0e Rename all links to main (#11856) 2021-09-08 16:01:42 -04:00
Sébastien LorberandGitHub 705fbd7e3e Jest Website v2 (#11149) 2021-03-11 17:57:06 +01:00
Mahfoudh ArousandGitHub bb75c3dac0 fixing few typos and enhancing clarity in few sentences, in docs (#10296) 2020-07-23 07:39:43 +02:00
JongmunandMichał Pierzchała 79709a765e docs: remove expect.assertions(1) in rejects example of Tutoria… (#9149)
* docs: remove expect.assertions(1) in rejects example of TutorialAsync.md

* docs: add a comment for expect.assertions(1) in rejects example of TutorialAsync.md

* docs: add a comment for expect.assertions(1) in rejects example of TutorialAsync.md

* fix a comment

* fix a comment

* fix a comment
2019-11-20 23:56:24 +01:00
Carolyn StranskyandMichał Pierzchała 770efddf10 Docs: More inclusive wording (#9045) 2019-10-11 22:53:50 +02:00
Carolyn StranskyandChristoph Nakazawa 7272c997c5 Docs: Removed condescending language (#9040)
* Round 1 - simply, just

* Round 2 - easy, easily, of course, simple
2019-10-11 15:53:50 +09:00
Chafic NajjarandMichał Pierzchała 9e0b40dab2 Replace test with it in TutorialAsync.md (#8921)
`it` is used everywhere in TutorialAsync.md except for one test where `test` is used. This commit replaces that `test` with an `it` to keep things consistent and because there does not seem to be a good reason to use `test` over `it` here.
2019-09-07 12:46:40 +02:00
Simen BekkhusandGitHub 5def3a0858 Migrate to Babel 7 (#7016) 2018-12-18 10:28:03 +01:00
Simen BekkhusandGitHub 5a640640a1 chore: upgrade prettier (#7336) 2018-11-19 15:46:34 +01:00
Veniamin KrolandSimen Bekkhus b46c69936b Get rid of the redundant async keyword (#6710) 2018-07-18 14:24:44 +02:00
IkaandChristoph Nakazawa 852e1c2050 docs: adjust heading level to enable navigation (#6539)
* docs: adjust heading level

* docs: adjust heading level for versioned docs
2018-06-28 08:53:24 +01:00
Simen BekkhusandMichał Pierzchała 8f4801e98f stop wrapping markdown (#6299) 2018-05-27 01:16:17 +01:00
Rick Hanlon IIandMiguel Jiménez Esún 8023411e8c Backfill 22.x docs (#5822) 2018-03-27 16:06:31 +01:00
Simen BekkhusandChristoph Nakazawa 3005ee223c Format markdown files with Prettier (#4853)
* Format md files with prettier

* Format even more markdown

* Fix escaping of .

* Don't use prettier on readme.md

* Use [email protected]

* Prettify moar files

* Remove redundant prettier options from vscode settings

* Format with prettier 1.8.2
2017-11-10 19:33:02 +00:00
KenrickandChristoph Nakazawa f6dd71e4d3 Fix more broken links in documentation (#4684) 2017-10-13 10:44:47 +01:00
Eric NakagawaandGitHub dc4f67a99b Update website to use Docusaurus (#4536)
* Adding a clean copy of Docusaurus

Updating sidebar

Modifying files into Docusaurus format

Slight header logo CSS change

Ignore translated files and build directory

Proper file locations for Docusaurus

Move blog files to Docusaurus preferred location, modified crowdin to output /docs to /translated_pages, updated siteConfig.js

Eslinting Docusaurus files

Ignoring website/blog pages

Linter fixes

* Updating Circle config to remove website test

* Updating Circle config to auto-deploy website

* Add @deltice's config changes before website build, skip yarn build step

* Switch crowdin branch to master

* Updating siteconfig to @deltice's file

* Test crowdin branch

* Switching Crowdin to master

* Uses yarn to install, run, and deploy

* Feedback fixes

Switch to use process.env.VAR for algolia key

Switching crowdin upload/download to use yarn

Circle CI fix

Adding a delay to crowdin

Fixing prettier errors

Updating crowdin command in circle ci config

Path fix

* Upgrading docusaurus to 1.0.0a40, adds an RSS/Atom feed

* Update Docusaurus version

* Updated footer to reflect current footer. Updated footer logo.

* Fixes Edit this doc link, removes node_modules from .gitignore

* Move .gitignore rules to top level

* Updating license file in siteConfig to MIT, added new Docusaurus beta to package.json

* Lint fix

* Editing siteConfig.js to account for /docs not living in /docs/en
2017-10-11 09:00:06 +01:00
Eric NakagawaandChristoph Pojer 340ecfcd23 Add Localization Support for Jest Website (#3416)
* Adds a link to CrowdIn project from language drop down

* Adds comments to generated files

* Modify Circle CI to manually download crowdin cli

* Doc build process only renders pages that are enabled in languages.js

* Added a favicon.ico

* Merging TutorialAsync.md

Adding Bosnian, enabling Espanol

Using ENV variables
2017-05-02 21:33:30 +01:00
Robin PokornýandChristoph Pojer c15aefd26d 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 NakagawaandDmitrii Abramov 910f9b9b50 Revert Localization effort (#3404)
* Revert Localization effort

* Reran prettier

* Revert dangerfile.js

* Reverting README.md

* Moving line alphabetical order
2017-04-27 21:40:58 -07:00
Eric NakagawaandChristoph Pojer 97e2fbb370 Add Localization Support for Jest Website (#3337)
* Merging TutorialAsync.md

* Copied all docs from current master branch

Localization Cleanup

Added a link to CrowdIn in language drop down

Further cleanup, moved CrowdIn API key to environment

HeaderNav fix

* Fixes prettier.js and other CI issues
Added comments to generated files
Worked out additional lint issues, added i18n files to ignore

* Update .eslintignore
2017-04-25 18:02:29 +01:00
Eric NakagawaandChristoph Pojer fc0f1d1a92 Update TutorialAsync.md to use 'env' preset (#3305)
Reduces requirements for this feature to work.
2017-04-17 08:56:06 -07:00
Simon AdcockandDmitrii Abramov 386b4d7b8e clarify that resolves introduced in v20 (#3245) 2017-04-03 13:56:56 -07:00
Dirk-Jan RuttenandHéctor Ramos 77c4f7ce99 Updated expect API docs with .resolves and .rejects (#3172)
* Updated expect API docs with .resolves and .rejects

* Fixed linter errors in the docs.

* added API availability status

* minor styling issue fix
2017-03-21 14:19:29 -07:00
Hannan AliandChristoph Pojer 3fd30b3db6 ESLint support for documentation (#3047)
* add markdown plugin in eslint

* add lint-docs build step

* lint JavaScript file

* final lint-docs command

* lint ExpectAPI

* lint GettingStarted.md

* lint GlobalAPI

* lint GlobalAPI

* lint JestObjectAPI

* lint Webpack.md

* lint UsingMatchers.md in docs

* lint TutorialReactNative.md in docs

* lint TutorialReact.md in docs

* lint docs file

* add lint-docs to test-ci script

* add lint-docs script to test & test-ci

* turn off more rules to lint-docs in package.json

* remove lint-docs from test and test-ci

* add lint-docs to test script in package.json

* remove lint-docs script from circle.yml

* add lint-docs script to test-ci in package.json

* rename js codeblock with json appropriately

* remove unnecessary log files

* remove lint-docs from test-ci

test script already includes lint-docs,
it'll be reduntant to do the same for more than one node versions

* remove error.log file

* use eslintrc-docs.json for overriding

* remove eslint comments from docs

Removing eslint comments from docs and moving them to
top level in .eslintrc-docs.json

* add lint-docs in correct order to test-ci and test
2017-03-04 08:46:48 +00:00
Pavel ChertorogovandChristoph Pojer 7f7faa014d Update TutorialAsync.md (#2871)
Add semicolon and additional notice about expect.assertion
2017-02-13 08:54:17 +00:00
Vladimir DanchenkovandChristoph Pojer 973541d214 check that promise actually throws (#2782) 2017-02-02 12:36:19 +00:00
Héctor RamosandGitHub be1468fb40 Revamped Jest Docs and Website
New look and feel. Updated all tutorials, docs, guides with latest best practices.

* Cleaned up API Reference docs (#2422)
* Reorganized Sidebar Navigation
* New Introduction Section (#2425)
* Simplified Getting Started introduction
* Break up API Reference into multiple docs, separate from Guides (#2388)
* Support is now Help (#2370)
* Add "Snapshot Testing", "Testing Asynchronous Code" & "Setup and Teardown" docs (#2419, #2406)
* Create Jest user showcase (#2369)
* New blog post announcing refreshed documentation (#2522)
* Truncate blog posts in blog index
* New homepage hero (#2662)
* New mobile nav (#2664)
* Add standard FB Open Source Footer (#2660)
* Add RedirectLayout to prevent broken links (#2700)
* Refreshed Homepage and Colors across site (#2699)
* Deploy Jest website via CircleCI
2017-01-27 09:40:05 -08: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
Jason QuenseandFacebook Github Bot 8 0b17c655ff Add Webpack tutorial
Summary:
This could stand some editorial attention :P
Closes https://github.com/facebook/jest/pull/1078

Differential Revision: D3353135

fbshipit-source-id: 890b509d903bb5a3dcac799619cef116d9c2c940
2016-05-26 16:30:40 -07:00
Dmitrii AbramovandFacebook Github Bot 3 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
cpojerandFacebook Github Bot 6 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
iamchenxinandFacebook Github Bot 4 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
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