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 🙏

© 2024 – Pkg Stats / Ryan Hefner

ass

v0.0.6

Published

A flexible node code coverage library with multiple-process support.

Downloads

64

Readme

Build Status

Ass: Cross Process Code Coverage

ass is a small node.js code coverage library with the following features:

  • dynamic instrumentation: code is instrumented on the fly
  • minimal setup: get code coverage reports with minimal impact on your project
  • multiple process support: coverage data from multiple processes is aggregated into a single report
  • different report formats: basic reporting functionality built in

Theory

The philosophy behind ass is that implementing code coverage should be a trivial process. That no pre or post processing should be required. That the code coverage library should itself handle reporting (not require support from your test framework). And finally, that code coverage data should be programatically accessible.

Practice

To get started with ass, first install it:

npm install --save-dev ass

Then instrument processes that are run by your test harness by adding a single "stub" file (say your original server was in server.js, let's assume you name the stub stub.js):

require('ass');
require('./server.js');

Finally, you can enable testing in your test harness programatically:

var ass = require('ass').enable();

// .. run all of your tests, spawning instrumented processes

ass.report('html', function(err, report) {
  require('fs').writeFileSync('coverage.html', report);
});

Example

A full example of code coverage is available:

$ git clone git://github.com/lloyd/ass
$ cd ass/example
$ npm install
$ npm test
$ open coverage.html

License

MIT

Credits

The infamous Zach Carter created our fantastic logo.

The design of the html reporter was lifted from TJ Holowaychuk's fantastic mocha test framework.