args.d.ts 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448
  1. /**
  2. * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.
  3. *
  4. * This source code is licensed under the MIT license found in the
  5. * LICENSE file in the root directory of this source tree.
  6. */
  7. import type { Config } from '@jest/types';
  8. export declare function check(argv: Config.Argv): true;
  9. export declare const usage = "Usage: $0 [--config=<pathToConfigFile>] [TestPathPattern]";
  10. export declare const docs = "Documentation: https://jestjs.io/";
  11. export declare const options: {
  12. readonly all: {
  13. readonly description: string;
  14. readonly type: "boolean";
  15. };
  16. readonly automock: {
  17. readonly description: "Automock all files by default.";
  18. readonly type: "boolean";
  19. };
  20. readonly bail: {
  21. readonly alias: "b";
  22. readonly description: "Exit the test suite immediately after `n` number of failing tests.";
  23. readonly type: "boolean";
  24. };
  25. readonly cache: {
  26. readonly description: string;
  27. readonly type: "boolean";
  28. };
  29. readonly cacheDirectory: {
  30. readonly description: string;
  31. readonly type: "string";
  32. };
  33. readonly changedFilesWithAncestor: {
  34. readonly description: string;
  35. readonly type: "boolean";
  36. };
  37. readonly changedSince: {
  38. readonly description: string;
  39. readonly nargs: 1;
  40. readonly type: "string";
  41. };
  42. readonly ci: {
  43. readonly description: string;
  44. readonly type: "boolean";
  45. };
  46. readonly clearCache: {
  47. readonly description: string;
  48. readonly type: "boolean";
  49. };
  50. readonly clearMocks: {
  51. readonly description: string;
  52. readonly type: "boolean";
  53. };
  54. readonly collectCoverage: {
  55. readonly description: "Alias for --coverage.";
  56. readonly type: "boolean";
  57. };
  58. readonly collectCoverageFrom: {
  59. readonly description: string;
  60. readonly type: "string";
  61. };
  62. readonly collectCoverageOnlyFrom: {
  63. readonly description: "Explicit list of paths coverage will be restricted to.";
  64. readonly string: true;
  65. readonly type: "array";
  66. };
  67. readonly color: {
  68. readonly description: string;
  69. readonly type: "boolean";
  70. };
  71. readonly colors: {
  72. readonly description: "Alias for `--color`.";
  73. readonly type: "boolean";
  74. };
  75. readonly config: {
  76. readonly alias: "c";
  77. readonly description: string;
  78. readonly type: "string";
  79. };
  80. readonly coverage: {
  81. readonly description: string;
  82. readonly type: "boolean";
  83. };
  84. readonly coverageDirectory: {
  85. readonly description: "The directory where Jest should output its coverage files.";
  86. readonly type: "string";
  87. };
  88. readonly coveragePathIgnorePatterns: {
  89. readonly description: string;
  90. readonly string: true;
  91. readonly type: "array";
  92. };
  93. readonly coverageProvider: {
  94. readonly choices: readonly ["babel", "v8"];
  95. readonly description: "Select between Babel and V8 to collect coverage";
  96. };
  97. readonly coverageReporters: {
  98. readonly description: string;
  99. readonly string: true;
  100. readonly type: "array";
  101. };
  102. readonly coverageThreshold: {
  103. readonly description: string;
  104. readonly type: "string";
  105. };
  106. readonly debug: {
  107. readonly description: "Print debugging info about your jest config.";
  108. readonly type: "boolean";
  109. };
  110. readonly detectLeaks: {
  111. readonly description: string;
  112. readonly type: "boolean";
  113. };
  114. readonly detectOpenHandles: {
  115. readonly description: string;
  116. readonly type: "boolean";
  117. };
  118. readonly env: {
  119. readonly description: string;
  120. readonly type: "string";
  121. };
  122. readonly errorOnDeprecated: {
  123. readonly description: "Make calling deprecated APIs throw helpful error messages.";
  124. readonly type: "boolean";
  125. };
  126. readonly expand: {
  127. readonly alias: "e";
  128. readonly description: "Use this flag to show full diffs instead of a patch.";
  129. readonly type: "boolean";
  130. };
  131. readonly filter: {
  132. readonly description: string;
  133. readonly type: "string";
  134. };
  135. readonly findRelatedTests: {
  136. readonly description: string;
  137. readonly type: "boolean";
  138. };
  139. readonly forceExit: {
  140. readonly description: string;
  141. readonly type: "boolean";
  142. };
  143. readonly globalSetup: {
  144. readonly description: "The path to a module that runs before All Tests.";
  145. readonly type: "string";
  146. };
  147. readonly globalTeardown: {
  148. readonly description: "The path to a module that runs after All Tests.";
  149. readonly type: "string";
  150. };
  151. readonly globals: {
  152. readonly description: string;
  153. readonly type: "string";
  154. };
  155. readonly haste: {
  156. readonly description: "A JSON string with map of variables for the haste module system";
  157. readonly type: "string";
  158. };
  159. readonly init: {
  160. readonly description: "Generate a basic configuration file";
  161. readonly type: "boolean";
  162. };
  163. readonly injectGlobals: {
  164. readonly description: "Should Jest inject global variables or not";
  165. readonly type: "boolean";
  166. };
  167. readonly json: {
  168. readonly description: string;
  169. readonly type: "boolean";
  170. };
  171. readonly lastCommit: {
  172. readonly description: string;
  173. readonly type: "boolean";
  174. };
  175. readonly listTests: {
  176. readonly description: string;
  177. readonly type: "boolean";
  178. };
  179. readonly logHeapUsage: {
  180. readonly description: string;
  181. readonly type: "boolean";
  182. };
  183. readonly maxConcurrency: {
  184. readonly description: string;
  185. readonly type: "number";
  186. };
  187. readonly maxWorkers: {
  188. readonly alias: "w";
  189. readonly description: string;
  190. readonly type: "string";
  191. };
  192. readonly moduleDirectories: {
  193. readonly description: string;
  194. readonly string: true;
  195. readonly type: "array";
  196. };
  197. readonly moduleFileExtensions: {
  198. readonly description: string;
  199. readonly string: true;
  200. readonly type: "array";
  201. };
  202. readonly moduleNameMapper: {
  203. readonly description: string;
  204. readonly type: "string";
  205. };
  206. readonly modulePathIgnorePatterns: {
  207. readonly description: string;
  208. readonly string: true;
  209. readonly type: "array";
  210. };
  211. readonly modulePaths: {
  212. readonly description: string;
  213. readonly string: true;
  214. readonly type: "array";
  215. };
  216. readonly noStackTrace: {
  217. readonly description: "Disables stack trace in test results output";
  218. readonly type: "boolean";
  219. };
  220. readonly notify: {
  221. readonly description: "Activates notifications for test results.";
  222. readonly type: "boolean";
  223. };
  224. readonly notifyMode: {
  225. readonly description: "Specifies when notifications will appear for test results.";
  226. readonly type: "string";
  227. };
  228. readonly onlyChanged: {
  229. readonly alias: "o";
  230. readonly description: string;
  231. readonly type: "boolean";
  232. };
  233. readonly onlyFailures: {
  234. readonly alias: "f";
  235. readonly description: "Run tests that failed in the previous execution.";
  236. readonly type: "boolean";
  237. };
  238. readonly outputFile: {
  239. readonly description: string;
  240. readonly type: "string";
  241. };
  242. readonly passWithNoTests: {
  243. readonly description: "Will not fail if no tests are found (for example while using `--testPathPattern`.)";
  244. readonly type: "boolean";
  245. };
  246. readonly preset: {
  247. readonly description: "A preset that is used as a base for Jest's configuration.";
  248. readonly type: "string";
  249. };
  250. readonly prettierPath: {
  251. readonly description: "The path to the \"prettier\" module used for inline snapshots.";
  252. readonly type: "string";
  253. };
  254. readonly projects: {
  255. readonly description: string;
  256. readonly string: true;
  257. readonly type: "array";
  258. };
  259. readonly reporters: {
  260. readonly description: "A list of custom reporters for the test suite.";
  261. readonly string: true;
  262. readonly type: "array";
  263. };
  264. readonly resetMocks: {
  265. readonly description: string;
  266. readonly type: "boolean";
  267. };
  268. readonly resetModules: {
  269. readonly description: string;
  270. readonly type: "boolean";
  271. };
  272. readonly resolver: {
  273. readonly description: "A JSON string which allows the use of a custom resolver.";
  274. readonly type: "string";
  275. };
  276. readonly restoreMocks: {
  277. readonly description: string;
  278. readonly type: "boolean";
  279. };
  280. readonly rootDir: {
  281. readonly description: string;
  282. readonly type: "string";
  283. };
  284. readonly roots: {
  285. readonly description: string;
  286. readonly string: true;
  287. readonly type: "array";
  288. };
  289. readonly runInBand: {
  290. readonly alias: "i";
  291. readonly description: string;
  292. readonly type: "boolean";
  293. };
  294. readonly runTestsByPath: {
  295. readonly description: string;
  296. readonly type: "boolean";
  297. };
  298. readonly runner: {
  299. readonly description: "Allows to use a custom runner instead of Jest's default test runner.";
  300. readonly type: "string";
  301. };
  302. readonly selectProjects: {
  303. readonly description: string;
  304. readonly string: true;
  305. readonly type: "array";
  306. };
  307. readonly setupFiles: {
  308. readonly description: string;
  309. readonly string: true;
  310. readonly type: "array";
  311. };
  312. readonly setupFilesAfterEnv: {
  313. readonly description: string;
  314. readonly string: true;
  315. readonly type: "array";
  316. };
  317. readonly showConfig: {
  318. readonly description: "Print your jest config and then exits.";
  319. readonly type: "boolean";
  320. };
  321. readonly silent: {
  322. readonly description: "Prevent tests from printing messages through the console.";
  323. readonly type: "boolean";
  324. };
  325. readonly skipFilter: {
  326. readonly description: string;
  327. readonly type: "boolean";
  328. };
  329. readonly snapshotSerializers: {
  330. readonly description: string;
  331. readonly string: true;
  332. readonly type: "array";
  333. };
  334. readonly testEnvironment: {
  335. readonly description: "Alias for --env";
  336. readonly type: "string";
  337. };
  338. readonly testEnvironmentOptions: {
  339. readonly description: string;
  340. readonly type: "string";
  341. };
  342. readonly testFailureExitCode: {
  343. readonly description: "Exit code of `jest` command if the test run failed";
  344. readonly type: "string";
  345. };
  346. readonly testLocationInResults: {
  347. readonly description: "Add `location` information to the test results";
  348. readonly type: "boolean";
  349. };
  350. readonly testMatch: {
  351. readonly description: "The glob patterns Jest uses to detect test files.";
  352. readonly string: true;
  353. readonly type: "array";
  354. };
  355. readonly testNamePattern: {
  356. readonly alias: "t";
  357. readonly description: "Run only tests with a name that matches the regex pattern.";
  358. readonly type: "string";
  359. };
  360. readonly testPathIgnorePatterns: {
  361. readonly description: string;
  362. readonly string: true;
  363. readonly type: "array";
  364. };
  365. readonly testPathPattern: {
  366. readonly description: string;
  367. readonly string: true;
  368. readonly type: "array";
  369. };
  370. readonly testRegex: {
  371. readonly description: "A string or array of string regexp patterns that Jest uses to detect test files.";
  372. readonly string: true;
  373. readonly type: "array";
  374. };
  375. readonly testResultsProcessor: {
  376. readonly description: string;
  377. readonly type: "string";
  378. };
  379. readonly testRunner: {
  380. readonly description: string;
  381. readonly type: "string";
  382. };
  383. readonly testSequencer: {
  384. readonly description: string;
  385. readonly type: "string";
  386. };
  387. readonly testTimeout: {
  388. readonly description: "This option sets the default timeouts of test cases.";
  389. readonly type: "number";
  390. };
  391. readonly testURL: {
  392. readonly description: "This option sets the URL for the jsdom environment.";
  393. readonly type: "string";
  394. };
  395. readonly timers: {
  396. readonly description: string;
  397. readonly type: "string";
  398. };
  399. readonly transform: {
  400. readonly description: string;
  401. readonly type: "string";
  402. };
  403. readonly transformIgnorePatterns: {
  404. readonly description: string;
  405. readonly string: true;
  406. readonly type: "array";
  407. };
  408. readonly unmockedModulePathPatterns: {
  409. readonly description: string;
  410. readonly string: true;
  411. readonly type: "array";
  412. };
  413. readonly updateSnapshot: {
  414. readonly alias: "u";
  415. readonly description: string;
  416. readonly type: "boolean";
  417. };
  418. readonly useStderr: {
  419. readonly description: "Divert all output to stderr.";
  420. readonly type: "boolean";
  421. };
  422. readonly verbose: {
  423. readonly description: "Display individual test results with the test suite hierarchy.";
  424. readonly type: "boolean";
  425. };
  426. readonly version: {
  427. readonly alias: "v";
  428. readonly description: "Print the version and exit";
  429. readonly type: "boolean";
  430. };
  431. readonly watch: {
  432. readonly description: string;
  433. readonly type: "boolean";
  434. };
  435. readonly watchAll: {
  436. readonly description: string;
  437. readonly type: "boolean";
  438. };
  439. readonly watchPathIgnorePatterns: {
  440. readonly description: string;
  441. readonly string: true;
  442. readonly type: "array";
  443. };
  444. readonly watchman: {
  445. readonly description: string;
  446. readonly type: "boolean";
  447. };
  448. };