Menu
JS/ESTypescriptDesign PatternsTestingService WorkersGitPerformanceGo
🌜
🌞
  • JS/ES
  • Typescript
  • Design Patterns
  • Testing
  • Service Workers
  • Git
  • Performance
  • Go
  • Getting Started
  • Using Matchers
  • Testing Asynchronous Code
  • Setup and Teardown
  • Mock
    • Mock Functions
    • Manual Mocks
    • ES6 Class Mocks
    • Bypassing module mocks
  • Snapshot Testing
  • Timer Mocks
  • DOM Manipulation
  • Testing React Apps
  • ̶W̶a̶t̶c̶h̶ ̶P̶l̶u̶g̶i̶n̶s̶
  • ̶T̶r̶o̶u̶b̶l̶e̶s̶h̶o̶o̶t̶i̶n̶g̶
  • API
    • Globals
    • Expect
    • Mock Functions
    • The Jest Object
    • Configuring Jest
    • Jest CLI Options

Getting Started | Jest

package.json:

{
"scripts": {
"test": "jest"
}
}

Running from command line#

yarn global add jest

run Jest on files matching my-test, using config.json as a configuration file

jest my-test --notify --config=config.json

Additional Configuration#

Edit this page
Next
Using Matchers | Jest »
  • Running from command line
  • Additional Configuration
Copyright © 2021 My Project, Inc. Built with Docusaurus.