Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: tapjs/tapjs
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: eaa008498b556ca8e6ca1ba7a55b877fe7032593
Choose a base ref
...
head repository: tapjs/tapjs
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: bc49fb76608d4dc49dfed760797a1a93d00e2835
Choose a head ref

Commits on Sep 30, 2019

  1. update cli doc

    isaacs committed Sep 30, 2019
    Copy the full SHA
    97deefb View commit details
  2. bump treport dep

    isaacs committed Sep 30, 2019
    Copy the full SHA
    7530d50 View commit details
  3. 14.6.9

    isaacs committed Sep 30, 2019
    Copy the full SHA
    a1ffb54 View commit details
  4. update cli doc

    isaacs committed Sep 30, 2019
    Copy the full SHA
    7f88ac5 View commit details

Commits on Oct 13, 2019

  1. Copy the full SHA
    2d0d46d View commit details
  2. Use Error.captureStackTrace instead of polyfill

    It's supported everywhere tap runs anyway.
    isaacs committed Oct 13, 2019
    Copy the full SHA
    b51f17a View commit details

Commits on Oct 14, 2019

  1. Copy the full SHA
    2c93db8 View commit details
  2. Add t.testdir() feature

    So tired of manually setting these things up.  Too tedious.
    isaacs committed Oct 14, 2019
    Copy the full SHA
    9c85d03 View commit details
  3. update cli doc

    isaacs committed Oct 14, 2019
    Copy the full SHA
    b59ef75 View commit details
  4. docs: update changelog

    isaacs committed Oct 14, 2019
    Copy the full SHA
    355b20c View commit details
  5. Copy the full SHA
    bfb0610 View commit details

Commits on Oct 16, 2019

  1. Copy the full SHA
    fd7fe27 View commit details
  2. Copy the full SHA
    328487e View commit details
  3. Always hook source map support into the right places

    This tells NYC to always produce a source map, and adds the hookRequire flag
    so that source-map-support will apply it in the appropriate places.
    isaacs committed Oct 16, 2019
    Copy the full SHA
    5f23990 View commit details
  4. 14.7.1

    isaacs committed Oct 16, 2019
    Copy the full SHA
    876ab9c View commit details
  5. update cli doc

    isaacs committed Oct 16, 2019
    Copy the full SHA
    3c049d9 View commit details

Commits on Oct 18, 2019

  1. update tap-parser and treport

    isaacs committed Oct 18, 2019
    Copy the full SHA
    25034e5 View commit details
  2. Always exclude test files from NYC coverage

    This only causes problems and slowness.
    isaacs committed Oct 18, 2019
    Copy the full SHA
    ba2b99f View commit details
  3. Copy the full SHA
    b280a3a View commit details
  4. Expose timing info on all test objects

    This includes test objects that are simulated based on stdin TAP data
    isaacs committed Oct 18, 2019
    Copy the full SHA
    8a3b269 View commit details
  5. 14.7.2

    isaacs committed Oct 18, 2019
    Copy the full SHA
    1e2f18b View commit details
  6. update cli doc

    isaacs committed Oct 18, 2019
    Copy the full SHA
    f5b622a View commit details
  7. changelog update for 14.7

    isaacs committed Oct 18, 2019
    Copy the full SHA
    f73d476 View commit details
  8. docs: Add virtuaaliviivakoodi to the 100 club

    GitHub repo can be found [here](https://github.com/akselinurmio/virtuaaliviivakoodi).
    
    PR-URL: #589
    Credit: @akselinurmio
    Close: #589
    Reviewed-by: @isaacs
    akselinurmio authored and isaacs committed Oct 18, 2019
    Copy the full SHA
    1c6110b View commit details
  9. Fix typo in documentation

    PR-URL: #591
    Credit: @scansdale
    Close: #591
    Reviewed-by: @isaacs
    Sean Cansdale authored and isaacs committed Oct 18, 2019
    Copy the full SHA
    f30b099 View commit details

Commits on Oct 20, 2019

  1. Default testdirName to TAP if no main available

    Also prevents a throw when loading tap in a node repl.
    isaacs committed Oct 20, 2019
    Copy the full SHA
    f261773 View commit details
  2. 14.7.3

    isaacs committed Oct 20, 2019
    Copy the full SHA
    3dc8789 View commit details
  3. update cli doc

    isaacs committed Oct 20, 2019
    Copy the full SHA
    1d72113 View commit details
  4. Copy the full SHA
    307b581 View commit details
  5. Add t.hasStrict

    Fix #590
    isaacs committed Oct 20, 2019
    Copy the full SHA
    f40ce76 View commit details

Commits on Oct 21, 2019

  1. 14.8.0

    isaacs committed Oct 21, 2019
    Copy the full SHA
    9113f30 View commit details
  2. update cli doc

    isaacs committed Oct 21, 2019
    Copy the full SHA
    a46f0a5 View commit details

Commits on Oct 22, 2019

  1. temporarily bundle source-map-support

    Fix #605
    isaacs committed Oct 22, 2019
    Copy the full SHA
    f4956bc View commit details
  2. 14.8.1

    isaacs committed Oct 22, 2019
    Copy the full SHA
    134bdab View commit details
  3. update cli doc

    isaacs committed Oct 22, 2019
    Copy the full SHA
    be36998 View commit details
  4. Copy the full SHA
    76b29d5 View commit details
  5. 14.8.2

    isaacs committed Oct 22, 2019
    Copy the full SHA
    835fa5a View commit details
  6. update cli doc

    isaacs committed Oct 22, 2019
    Copy the full SHA
    23f0b5a View commit details

Commits on Oct 30, 2019

  1. Copy the full SHA
    a0afe83 View commit details
  2. 14.8.3

    isaacs committed Oct 30, 2019
    Copy the full SHA
    de8b15b View commit details
  3. update cli doc

    isaacs committed Oct 30, 2019
    Copy the full SHA
    b45ec73 View commit details
  4. Add --before and --after script support

    Fix #608
    isaacs committed Oct 30, 2019
    Copy the full SHA
    7e93be6 View commit details
  5. 14.9.0

    isaacs committed Oct 30, 2019
    Copy the full SHA
    f7a2c69 View commit details
  6. update cli doc

    isaacs committed Oct 30, 2019
    Copy the full SHA
    0cad901 View commit details
  7. Copy the full SHA
    09344fb View commit details
  8. 14.9.1

    isaacs committed Oct 30, 2019
    Copy the full SHA
    b49070b View commit details
  9. update cli doc

    isaacs committed Oct 30, 2019
    Copy the full SHA
    54a47d7 View commit details

Commits on Nov 1, 2019

  1. fix test on node v8

    isaacs committed Nov 1, 2019
    Copy the full SHA
    ddb09ce View commit details
  2. Copy the full SHA
    19181ac View commit details
  3. Copy the full SHA
    95726b8 View commit details
Showing with 7,931 additions and 12,041 deletions.
  1. +36 −0 .github/workflows/ci.yml
  2. +1 −0 .gitignore
  3. +0 −16 .travis.yml
  4. +1 −1 README.md
  5. +69 −27 bin/jack.js
  6. +177 −66 bin/run.js
  7. +2 −2 coverage-map.js
  8. +78 −0 docs/src/content/changelog/index.md
  9. +45 −46 docs/src/content/docs/api/advanced/index.md
  10. +38 −3 docs/src/content/docs/api/asserts/index.md
  11. +125 −0 docs/src/content/docs/api/fixtures/index.md
  12. +3 −1 docs/src/content/docs/api/grep/index.md
  13. +23 −1 docs/src/content/docs/api/index.md
  14. +1 −1 docs/src/content/docs/api/mochalike/index.md
  15. +52 −0 docs/src/content/docs/api/mocks/index.md
  16. +1 −1 docs/src/content/docs/api/only/index.md
  17. +1 −1 docs/src/content/docs/api/parallel-tests/index.md
  18. +8 −13 docs/src/content/docs/api/promises/index.md
  19. +14 −14 docs/src/content/docs/api/snapshot-testing/index.md
  20. +1 −1 docs/src/content/docs/api/subtests/index.md
  21. +67 −23 docs/src/content/docs/api/test-lifecycle-events/index.md
  22. +52 −19 docs/src/content/docs/cli/index.md
  23. +1 −1 docs/src/content/docs/cli/index.template
  24. +1 −1 docs/src/content/docs/configuring/index.md
  25. +12 −1 docs/src/content/docs/coverage/100/index.md
  26. +3 −3 docs/src/content/docs/coverage/coverage-map/index.md
  27. +13 −9 docs/src/content/docs/coverage/index.md
  28. +3 −2 docs/src/content/docs/getting-started/index.md
  29. +22 −19 docs/src/content/docs/reporting/index.md
  30. +10 −9 docs/src/content/docs/rerunning-partial-suites/index.md
  31. +339 −0 docs/src/content/docs/structure/index.md
  32. +1 −1 docs/src/content/docs/tap-files/index.md
  33. +20 −19 docs/src/content/docs/using-with/index.md
  34. +1 −1 docs/src/content/docs/watch/index.md
  35. +0 −342 lib/base.js
  36. +9 −0 lib/cb-promise.js
  37. +0 −100 lib/clean-yaml-object.js
  38. +0 −5 lib/diags.js
  39. +0 −82 lib/extra-from-error.js
  40. +8 −4 lib/mocha.js
  41. +0 −12 lib/obj-to-yaml.js
  42. +0 −60 lib/parse-test-args.js
  43. +0 −55 lib/point.js
  44. +1 −2 lib/repl.js
  45. +0 −84 lib/snapshot.js
  46. +0 −168 lib/spawn.js
  47. +0 −51 lib/stack.js
  48. +0 −37 lib/stdin.js
  49. +0 −25 lib/stdio-polyfill.js
  50. +6 −5 lib/synonyms.js
  51. +23 −239 lib/tap.js
  52. +31 −0 lib/tap.mjs
  53. +0 −1,714 lib/test.js
  54. +2 −4 lib/watch.js
  55. +4,903 −1,571 package-lock.json
  56. +68 −49 package.json
  57. +0 −1 scripts/snap.sh
  58. +62 −0 settings.js
  59. +0 −82 tap-snapshots/test-base.js-TAP.test.js
  60. +0 −14 tap-snapshots/test-clean-yaml-object.js-TAP.test.js
  61. +0 −32 tap-snapshots/test-run-esm.js-TAP.test.js
  62. +0 −89 tap-snapshots/test-spawn.js-TAP.test.js
  63. +0 −26 tap-snapshots/test-tap-autoend-false-with-teardown.js-TAP.test.js
  64. +0 −23 tap-snapshots/test-tap-bail.js-TAP.test.js
  65. +0 −25 tap-snapshots/test-tap-close-even-if-exiting-hard.js-TAP.test.js
  66. +0 −37 tap-snapshots/test-tap-node-debug-tap.js-TAP.test.js
  67. +0 −38 tap-snapshots/test-tap-not-ok.js-TAP.test.js
  68. +0 −24 tap-snapshots/test-tap-patch-process-twice.js-TAP.test.js
  69. +0 −24 tap-snapshots/test-tap-plan-0.js-TAP.test.js
  70. +0 −26 tap-snapshots/test-tap-plan-unsatisfied.js-TAP.test.js
  71. +0 −26 tap-snapshots/test-tap-plan-unsatisied.js-TAP.test.js
  72. +0 −28 tap-snapshots/test-tap-resume.js-TAP.test.js
  73. +0 −26 tap-snapshots/test-tap-set-timeout.js-TAP.test.js
  74. +0 −25 tap-snapshots/test-tap-stdout-epipe.js-TAP.test.js
  75. +0 −43 tap-snapshots/test-tap-tap-debug-1.js-TAP.test.js
  76. +0 −44 tap-snapshots/test-tap-tap-grep-invert.js-TAP.test.js
  77. +0 −44 tap-snapshots/test-tap-tap-grep.js-TAP.test.js
  78. +0 −30 tap-snapshots/test-tap-tap-only.js-TAP.test.js
  79. +0 −25 tap-snapshots/test-tap-teardown-event-loop.js-TAP.test.js
  80. +0 −26 tap-snapshots/test-tap-teardown-throw-nonerror.js-TAP.test.js
  81. +0 −29 tap-snapshots/test-tap-teardown-throw.js-TAP.test.js
  82. +0 −33 tap-snapshots/test-tap-throw-nonerror.js-TAP.test.js
  83. +0 −26 tap-snapshots/test-tap-throw-unpatched-nonerror.js-TAP.test.js
  84. +0 −27 tap-snapshots/test-tap-throw-unpatched.js-TAP.test.js
  85. +0 −35 tap-snapshots/test-tap-timeout-sigterm-many-times.js-TAP.test.js
  86. +0 −33 tap-snapshots/test-tap-timeout-sigterm-with-handle.js-TAP.test.js
  87. +0 −33 tap-snapshots/test-tap-timeout-sigterm.js-TAP.test.js
  88. +0 −29 tap-snapshots/test-tap-too-much.js-TAP.test.js
  89. +0 −43 tap-snapshots/test-tap-uncaught-exception.js-TAP.test.js
  90. +0 −42 tap-snapshots/test-tap-unhandled-promise.js-TAP.test.js
  91. +0 −3,243 tap-snapshots/test-test.js-TAP.test.js
  92. 0 tap-snapshots/{test-repl.js-TAP.test.js → test/repl.js.test.cjs}
  93. +2 −1 tap-snapshots/{test-run-basic.js-TAP.test.js → test/run/basic.js.test.cjs}
  94. +211 −0 tap-snapshots/test/run/before-after.js.test.cjs
  95. 0 tap-snapshots/{test-run-cat.js-TAP.test.js → test/run/cat.js.test.cjs}
  96. +39 −39 tap-snapshots/{test-run-coverage.js-TAP.test.js → test/run/coverage.js.test.cjs}
  97. +63 −39 tap-snapshots/{test-run-dump-config.js-TAP.test.js → test/run/dump-config.js.test.cjs}
  98. 0 tap-snapshots/{test-run-env.js-TAP.test.js → test/run/env.js.test.cjs}
  99. 0 tap-snapshots/{test-run-executables.js-TAP.test.js → test/run/executables.js.test.cjs}
  100. 0 tap-snapshots/{test-run-files.js-TAP.test.js → test/run/files.js.test.cjs}
  101. 0 tap-snapshots/{test-run-flow.js-TAP.test.js → test/run/flow.js.test.cjs}
  102. 0 tap-snapshots/{test-run-invalid-option.js-TAP.test.js → test/run/invalid-option.js.test.cjs}
  103. 0 tap-snapshots/{test-run-jsx.js-TAP.test.js → test/run/jsx.js.test.cjs}
  104. +34 −0 tap-snapshots/test/run/libtap-settings.js.test.cjs
  105. +6 −12 tap-snapshots/{test-tap-ok.js-TAP.test.js → test/run/nocolor-env.js.test.cjs}
  106. 0 tap-snapshots/{test-run-nonparallel.js-TAP.test.js → test/run/nonparallel.js.test.cjs}
  107. 0 tap-snapshots/{test-run-output-file.js-TAP.test.js → test/run/output-file.js.test.cjs}
  108. 0 tap-snapshots/{test-run-parallel.js-TAP.test.js → test/run/parallel.js.test.cjs}
  109. tap-snapshots/{test-run-reporters.js-TAP.test.js → test/run/reporters.js.test.cjs}
  110. +6 −0 tap-snapshots/{test-run-save-file.js-TAP.test.js → test/run/save-file.js.test.cjs}
  111. 0 tap-snapshots/{test-run-stdin.js-TAP.test.js → test/run/stdin.js.test.cjs}
  112. +7 −1 tap-snapshots/{test-run-test-regex.js-TAP.test.js → test/run/test-regex.js.test.cjs}
  113. 0 tap-snapshots/{test-run-ts.js-TAP.test.js → test/run/ts.js.test.cjs}
  114. +114 −0 tap-snapshots/test/run/watermarks.js.test.cjs
  115. +32 −0 tap-snapshots/test/settings/default.js.test.cjs
  116. +26 −0 tap-snapshots/test/settings/long-stack.js.test.cjs
  117. +270 −0 tap-snapshots/test/synonyms.js.test.cjs
  118. +64 −0 tap-snapshots/test/test.mjs.test.cjs
  119. 0 tap-snapshots/{test-watch.js-TAP.test.js → test/watch.js.test.cjs}
  120. +0 −348 test/base.js
  121. +13 −0 test/cb-promise.js
  122. +2 −1 test/clean-stacks.js
  123. +0 −125 test/clean-yaml-object.js
  124. +1 −1 test/coverage-map.js
  125. +0 −6 test/diags.js
  126. +0 −139 test/extra-from-error.js
  127. +1 −1 test/mocha.js
  128. +0 −6 test/obj-to-yaml.js
  129. +0 −29 test/parse-test-args.js
  130. +0 −77 test/point.js
  131. +7 −7 test/repl.js
  132. +16 −0 test/run/bad-rcfile.js
  133. +3 −2 test/run/basic.js
  134. +84 −0 test/run/before-after.js
  135. +1 −1 test/run/changed.js
  136. +2 −1 test/run/comments.js
  137. +8 −8 test/run/coverage.js
  138. +0 −2 test/run/dump-config.js
  139. +2 −1 test/run/env.js
  140. +0 −30 test/run/esm.js
  141. +3 −2 test/run/files.js
  142. +30 −0 test/run/index.js
  143. +2 −0 test/run/jsx.js
  144. +132 −0 test/run/libtap-settings.js
  145. +25 −0 test/run/nocolor-env.js
  146. +27 −0 test/run/rcfile-extensions.js
  147. +2 −1 test/run/reporters.js
  148. +9 −8 test/run/save-file.js
  149. +4 −0 test/run/test-regex.js
  150. +3 −0 test/run/ts.js
  151. +128 −0 test/run/watermarks.js
  152. +20 −0 test/settings/clean-for-snapshot.js
  153. +10 −0 test/settings/default.js
  154. +12 −0 test/settings/long-stack.js
  155. +51 −0 test/settings/overrides.js
  156. +0 −50 test/snapshot.js
  157. +0 −252 test/spawn.js
  158. +0 −45 test/stack.js
  159. +0 −131 test/stdin.js
  160. +0 −24 test/stdio-polyfill.js
  161. +1 −12 test/synonyms.js
  162. +57 −0 test/tap.js
  163. +0 −10 test/tap/autoend-false-with-teardown.js
  164. +0 −3 test/tap/bail.js
  165. +0 −6 test/tap/close-even-if-exiting-hard.js
  166. +0 −41 test/tap/index.js
  167. +0 −3 test/tap/node-debug-tap.js
  168. +0 −3 test/tap/not-ok.js
  169. +0 −3 test/tap/ok.js
  170. +0 −4 test/tap/patch-process-twice.js
  171. +0 −3 test/tap/plan-0.js
  172. +0 −1 test/tap/plan-unsatisfied.js
  173. +0 −3 test/tap/plan-unsatisied.js
  174. +0 −19 test/tap/resume.js
  175. +0 −4 test/tap/set-timeout.js
  176. +0 −9 test/tap/stdout-epipe.js
  177. +0 −3 test/tap/tap-debug-1.js
  178. +0 −13 test/tap/tap-grep-invert.js
  179. +0 −10 test/tap/tap-grep.js
  180. +0 −6 test/tap/tap-only.js
  181. +0 −7 test/tap/teardown-event-loop.js
  182. +0 −6 test/tap/teardown-throw-nonerror.js
  183. +0 −6 test/tap/teardown-throw.js
  184. +0 −4 test/tap/throw-nonerror.js
  185. +0 −3 test/tap/throw-unpatched-nonerror.js
  186. +0 −3 test/tap/throw-unpatched.js
  187. +0 −13 test/tap/timeout-sigterm-many-times.js
  188. +0 −7 test/tap/timeout-sigterm-with-handle.js
  189. +0 −7 test/tap/timeout-sigterm.js
  190. +0 −7 test/tap/too-much.js
  191. +0 −7 test/tap/uncaught-exception.js
  192. +0 −6 test/tap/unhandled-promise.js
  193. +22 −0 test/test-esm.js
  194. +0 −1,172 test/test.js
  195. +25 −0 test/test.mjs
  196. +15 −0 test/versions.js
  197. +4 −4 test/watch.js
36 changes: 36 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: ci

on:
push:
paths-ignore:
- 'docs/**'
- 'docs-content/**'
- '*.md'
pull_request:
paths-ignore:
- 'docs/**'
- 'docs-content/**'
- '*.md'

jobs:
test:
runs-on: ${{ matrix.os }}

strategy:
matrix:
node-version: [10.0.x, 10.x, 12.0.x, 12.x, 14.0.x, 14.x, 15.x]
os: [ubuntu-latest]

steps:
- uses: actions/checkout@v2

- name: Use Node.js
uses: actions/setup-node@v2.1.4
with:
node-version: ${{ matrix.node-version }}
- name: Install
run: |
npm install --ignore-scripts
- name: Run tests
run: |
npm test --color=always -- -c -t0
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -3,6 +3,7 @@

!bin/
!lib/
!settings.js
!docs/
/docs/public
/docs/node_modules
16 changes: 0 additions & 16 deletions .travis.yml

This file was deleted.

2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -3,7 +3,7 @@
A <abbr title="Test Anything Protocol">TAP</abbr> test framework for
Node.js.

[![Build Status](https://travis-ci.org/tapjs/node-tap.svg?branch=master)](https://travis-ci.org/tapjs/node-tap)
![Build Status](https://github.com/tapjs/node-tap/workflows/ci/badge.svg)

_Just wanna see some code? [Get started!](http://www.node-tap.org/basics/)_

96 changes: 69 additions & 27 deletions bin/jack.js
Original file line number Diff line number Diff line change
@@ -87,6 +87,12 @@ Much more documentation available at: https://www.node-tap.org/
built-in reporters or module reporters.`,
}),

'save-fixture': flag({
short: 'F',
envDefault: 'TAP_SAVE_FIXTURE',
description: 'Do not clean up fixtures created with t.testdir()',
}),

bail: flag({
short: 'b',
envDefault: 'TAP_BAIL',
@@ -280,6 +286,25 @@ Much more documentation available at: https://www.node-tap.org/
`
}),

before: opt({
hint: 'module',
description: `A node program to be run before test files are executed.
Exiting with a non-zero status code or a signal will fail
the test run and exit the process in error.`,
}),
after: opt({
hint: 'module',
description: `A node program to be executed after tests are finished.
This will be run even if a test in the series fails with
a bailout, but it will *not* be run if a --before script
fails.
Exiting with a non-zero status code or a signal will fail
the test run and exit the process in error.`,
}),

}, {

description: 'Code Coverage Options',
@@ -404,6 +429,7 @@ Much more documentation available at: https://www.node-tap.org/
If you run tests in this way, please add your project to the list.`,

'check-coverage': flag({
default: true,
description: `Check whether coverage is within
thresholds provided. Setting this
explicitly will default --coverage to
@@ -479,17 +505,25 @@ Much more documentation available at: https://www.node-tap.org/

'test-regex': opt({
hint: 'pattern',
default: '((\\/|^)(tests?|__tests?__)\\/.*|\\.(test|spec))\\.([mc]js|[jt]sx?)$',
// anything in a test/ or tests/ folder, or a /tests.js or /test.js,
// or anything ending in *.test.js or *.spec.js
default: '((\\/|^)(tests?|__tests?__)\\/.*|\\.(tests?|spec)|^\\/?tests?)\\.([mc]js|[jt]sx?)$',
description: `A regular expression pattern indicating tests to run if no
positional arguments are provided.
By default, tap will search for all files ending in
.ts, .tsx, .js, .jsx, .cjs, or .mjs, in a top-level folder
named test, tests, or __tests__, or any file ending in
'.spec.' or '.test.' before a supported extension.
'.spec.' or '.test.' before a supported extension, or a
top-level file named 'test.(js,jsx,...)' or
'tests.(js,jsx,...)'
Ie, the default value for this option is:
((\\/|^)(tests?|__tests?__)\\/.*|\\.(test|spec))\\.([mc]js|[jt]sx?)$
((\\/|^)(tests?|__tests?__)\\/.*|\\.(tests?|spec)|^\\/?tests?)\\.([mc]js|[jt]sx?)$
Note that .jsx files will only be run when --jsx is enabled,
.ts files will only be run when --ts is enabled, and .tsx
files will only be run with both --ts and --jsx are enabled.
`
}),

@@ -564,25 +598,20 @@ Much more documentation available at: https://www.node-tap.org/
description: `Run JS tests in 'use strict' mode`,
}),

esm: flag({
default: process.env.TAP_NO_ESM !== '1',
description: `Run .js and .mjs with support for EcmaScript modules
(Default: true)`,
}),
flow: flag({
description: `Removes flow types`,
}),

ts: flag({
default: process.env.TAP_NO_TS !== '1',
default: process.env.TAP_TS === '1',
description: `Automatically load .ts and .tsx tests with tap's bundled
ts-node module (Default: true)`,
ts-node module (Default: false)`,
}),

jsx: flag({
default: process.env.TAP_NO_JSX !== '1',
default: process.env.TAP_JSX === '1',
description: `Automatically load .jsx tests using tap's bundled import-jsx
loader (Default: true)`,
loader (Default: false)`,
}),

'nyc-help': flag({
@@ -618,6 +647,25 @@ Much more documentation available at: https://www.node-tap.org/
default: `${process.cwd()}/.taprc`,
}),

'libtap-settings': opt({
hint: 'module',
description: `A module which exports an object of fields to assign onto
'libtap/settings'. These are advanced configuration options
for modifying the behavior of tap's internal runtime.
Module path is resolved relative to the current working
directory.
Allowed fields: rmdirRecursive, rmdirRecursiveSync,
StackUtils, stackUtils, output, snapshotFile.
See libtap documentation for expected values and usage.
https://github.com/tapjs/libtap`,
envDefault: 'TAP_LIBTAP_SETTINGS',
default: null,
}),

'output-file': opt({
short: 'o',
hint: 'file',
@@ -686,6 +734,11 @@ Much more documentation available at: https://www.node-tap.org/
./.taprc`
}),

TAP_LIBTAP_SETTINGS: env({
description: `A path (relative to current working directory) of a file
that exports fields to override the default libtap settings`,
}),

TAP_TIMEOUT: env(num({
min: 0,
default: 30,
@@ -736,13 +789,6 @@ Much more documentation available at: https://www.node-tap.org/
excluded.`
})),

TAP_DEV_SHORTSTACK: env(flag({
description: `Set to '1' to exclude node-tap internals
in stack traces, even if the current
working directory is the tap project
itself.`
})),

TAP_DEBUG: env(flag({
description: `Set to '1' to turn on debug mode.`
})),
@@ -770,16 +816,12 @@ Much more documentation available at: https://www.node-tap.org/
description: `Set to '1' to set the --only flag`
})),

TAP_NO_ESM: env(flag({
description: `Set to '1' to disable automatic esm support`
})),

TAP_NO_TS: env(flag({
description: `Set to '1' to disable automatic typescript support`
TAP_TS: env(flag({
description: `Set to '1' to enable automatic typescript support`
})),

TAP_NO_JSX: env(flag({
description: `Set to '1' to disable automatic jsx support`
TAP_JSX: env(flag({
description: `Set to '1' to enable automatic jsx support`
})),

}, {
Loading