英語 での Jest の使用例とその 日本語 への翻訳
{-}
-
Colloquial
-
Ecclesiastic
-
Computer
-
Programming
Reactiflux is a Discord chat where a lot of Jest discussion happens.
If you run Jest via yarn test, you can pass the command line arguments directly as Jest arguments.
This will use custom reporter in addition to default reporters that Jest provides.
A list of paths to directories that Jest should use to search for files in.
Instructs Jest to use the real versions of the standard timer functions.
To learn about the other things that Jest can test, see Using Matchers.
Lists all tests as JSON that Jest will run given the arguments, and exits.
But often you need to instruct Jest to use a mock before modules use it.
Jest uses"matchers" to let you test values in different ways.
Note: When running Jest tests, please use the--runInBand flag.
When you run npm test or jest, this will produce an output file like this.
By now you should have a good idea of how Jest can make it easy to test your applications.
Follow the Jest Twitter account and blog to find out what's happening in the world of Jest.
During development of a transformer it can be useful to run Jest with--no-cache to frequently delete Jest's cache.
Try running Jest with--no-watchman or set the watchman configuration option to false.
Dodds you will learn how to install Jest and write your first unit test.
Alternatively you can use expect which is now part of Jest, and exposes the exact same API in Jest docs.
If you would like to try out Jest with an existing codebase, there are a number of ways to convert to Jest: .
The Jest core team and contributors regularly speak about Jest and Delightful JavaScript Testing.
The root directory that Jest should scan for tests and modules within.