npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

taz

v6.15.0

Published

Little test runner for node.js

Readme

Taz

Little test runner for node.js

FAQ

What inspired Taz?

Taz is mostly inspired by go test. After working in Go for awhile, you soon realize that they nailed testing and it's one of Go's top 5 features. There are features in taz that you won't find in any other Node.js test framework. These features come from go test.

I also wanted taz to feel familiar to existing Node.js users. The work done in Ava and Mocha inspired me here, particularly Ava's test API and Mocha's reporting system.

How does taz compare to Mocha, Jest, Ava, Tape, etc.?

Taz comes from using mocha for a long time. During this time, there were always just a few things I wanted to improve:

  • The ability to run tests with node test.js
  • First-class support for .mjs files
  • Parallelization across files
  • A simpler test API

I like Ava and it's pretty close to my ideal. I made a few different decisions in building taz:

  • Tests within a file run serially, rather than in parallel. This is to preserve the order of console.log.
  • No transpilation. This improves the startup performance of Taz and reduces resource usage. Taz leaves the responsibility of transpilation to the test author.
  • Mocha reporter support. I think this is just because I've been using mocha for so long, but I just love Mocha's test reporting style. Taz works with all of Mocha's reporters!

Jest is the hot new test framework and to be fair to Jest, I've used it the least out of this list. I found a minimal test to take about 1 second to run on my computer (cold startup). It appears that Jest is optimized for large test suites. This isn't my typical workload and Taz is not optimized for this workload, though I'm quite sure Taz would be competitive here as is. Philisophically, I prefer a test framework to do the minimum amount of necessary operations to support 95% of your testing needs. The last 5% of your needs can be pulled in from NPM.

Tape is the closest in spirit to taz. Tape used to be lower-level than Taz, but recently I've noticed it's become a lot higher-level. Taz has a few features that Tape doesn't have and Tape has a few features that Taz doesn't have. I don't have much else to say about Tape other than when you're trying out Taz, be sure to give Tape a shot too!

Does taz run tests within a file in parallel?

No it doesn't. This may change in the future, if we're able to figure out a way to preserve console ordering. I'd also like to explore test caching. Go's testing framework does a great job of caching tests that haven't changed.

Does taz have subtests?

Taz does not support subtests. I used to be a big subtest fan but I recently realized that every time I was using subtests, it would be less complex to do use table-driven tests instead.

Where's before(fn) and after(fn)

Taz does not support before and after functions. Like subtests, I used to think I needed them, but later realized that before(fn) and after(fn) encourage shared state across tests. It's generally better to do this:

test('my test', async t => {
  const db = await connect(
    t,
    process.env.POSTGRES_URL,
  )
  t.after(db.close)
})

If the resource is very expensive, then you can mimic before and after like this:

let expensive

test('open expensive resource', async t => {
  expensive = await connect(t)
})

test('test 1')
test('test 2')
test('test 3')

test('close expensive resource', async t => {
  await expensive.close()
})