itape

2019-08-15

Interactive tape test runner

itape

An interactive tape runner.

Concept

Interactive tape (itapefor short) is a modal test runner.

It behaves exactly like node except it has a few more features. The main trick it uses is to remember your last test run.

Because it knows your test history it can easily re-run your tests and print just the failures or jump straight into the debugger.

Usage

  • itape test/index.jsUse itapejust like node.
  • itape --fail test/index.jsPrint only failures
  • itape --trace test/index.jsPrint only failures and trace!
  • itape --debug test/index.jsPrint only failures and debug!

Trace mode

The trace mode uses the itapekey in your package.json. You should configure it like:

"itape": {
    "trace": {
      "debuglog": [
        "typedrequesthandler"
      ],
      "leakedHandles": true,
      "formatStack": true
    }
  }

Here we enable debuglogand leaked-handlesonly when trace is on.

The --traceutility means you do not have to remember which debuglog modules to enable.

Debug mode

The debug mode uses will re-run your tests with the debugger on. It will place a breakpoint at EVERY failed assertion.

This means you can just hit repland inspect the state around your failed assertion without changing the code of your tests!

HomePage

https://github.com/Raynos/itape

Repository

https://github.com/Raynos/itape


上一篇:format-stack
下一篇:unique-by
相关教程
关注微信

扫码加入 JavaScript 社区

相关文章
暂无相关文章

首次访问,需要验证
微信扫码,关注即可
(仅需验证一次)

欢迎加入 JavaScript 社区

号内回复关键字:

回到顶部