mzgoddard / jest-webpack

Use jest with webpack.

Home Page:https://www.npmjs.com/package/jest-webpack

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Support Jest flags and config options.

mzgoddard opened this issue · comments

Breaking the flags and options into phase first are the low hanging fruit, then snapshot and watch features, and finally coverage. Most of the low hanging fruit should be just testing that the option is passed and jest with the webpacked output behaves as expected, such as only testing tests that match the --testNamePattern. watch and coverage follow that up since many of them will take longer. --watchAll is likely to be supported sooner since the overall jest-webpack strategy strongly supports that. Supportly --onlyChanged and by relation --watch will take more time to create a fake repo with the files that would have been built in the last commit so jest can compare with the built files from the current changes.

Since all of watch and coverage will take longer many jest uses that use the low hanging fruit can use jest-webpack sooner. Hopefully some parts of watch and coverage can be implemented before the first phase is complete.

First

Flags

  • --bail (#4)
  • --config
  • --debug
  • --env
  • --expand
  • --findRelatedTests
  • --json
  • --outputFile
  • --logHeapUsage
  • --maxWorkers
  • --noStackTrace
  • --notify
  • --runInBand
  • --showConfig
  • --silent
  • --testNamePattern (#5)
  • --testPathPattern (#5)
  • --useStderr
  • --verbose
  • --version

Options

  • automock
  • browser
  • bail (#4)
  • cacheDirectory
  • globals
  • moduleFileExtensions
  • moduleDirectories
  • moduleNameMapper
  • modulePathIgnorePatterns
  • modulePaths
  • notify
  • preset
  • clearMocks
  • resetMocks
  • resetModules
  • rootDir
  • roots
  • setupFiles
  • testEnvironment
  • testMatch (#5)
  • testPathIgnorePatterns
  • testRegex (#5)
  • testURL
  • timers
  • unmockedModulePathPatterns
  • verbose

Second

Flags

  • --colors
  • --forceExit
  • --lastCommit
  • --onlyChanged
  • --updateSnapshot
  • --watch
  • --watchAll
  • --watchman

Options

  • snapshotSerializers

Third

Flags

  • --collectCoverageFrom
  • --coverage
  • --setupTestFrameworkScriptFile
  • --testRunner

Options

  • collectCoverage
  • collectCoverageFrom
  • coverageDirectory
  • coveragePathIgnorePatterns
  • coverageReporters
  • coverageThreshold
  • mapCoverage
  • resolver
  • setupTestFrameworkScriptFile
  • testResultsProcessor
  • testRunner
  • transform
  • transformIgnorePatterns

A --config flag would be nice for those tools that leverage webpack under the hood with a custom config filename.

@TheLarkInn ya. --config is up there. I'm leaving that to jest. Any options for webpack will be --webpack* so a webpack config option will be --webpackConfig. Figure this tool should follow jest's command line option styling.