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

@abradley2/elm-coverage

v0.3.0

Published

[Fork of](https://github.com/marc136/elm-coverage/tree/add_support_for_current_elm-test) for `zwilias/elm-coverage` so I can use it with 0.19.1 via an npm install

Downloads

11

Readme

Fork of for zwilias/elm-coverage so I can use it with 0.19.1 via an npm install

Elm Coverage Build Status Build status Documentation Status

Work in progress - Code coverage tooling for Elm

elm-coverage is a tool for calculating code coverage for Elm code tested with elm-test.

The goal of the reports generated by elm-coverage is to help you visualize what parts of your code are being evaluated when running your tests, and to try and guide you towards writing tests that focus specifically on the more complex functions in your codebase.

The goal is not to condense that information down into a single metric. It is too easy to write tests that don't make meaningful assertions about your code and its behaviour, but only serve to increase the coverage.

The only thing worse than having no tests is having tests that provide a false sense of security.

For further reading, please direct yourself to https://elm-coverage.readthedocs.io

Installation

Installing elm-coverage works much the same way as installing other tools in the Elm ecosystem:

npm i -g elm-coverage

Usage

The simplest invocation of elm-coverage is to simply invoke elm-coverage in the root of your project:

elm-coverage

By default, elm-coverage assumes that your sources exist in a separate src/ directory, that you have elm-test installed globally, and that elm-test needs no further, special flags.

You can specify an alternative path to crawl for sources to instrument:

elm-coverage elm_src/

If you don't want to use a globally installed elm-test, you can specify the path to an elm-test executable:

elm-coverage --elm-test ./node_modules/.bin/elm-test

Parameters following -- are passed through to elm-test, for example to specify the initial seed and number of fuzz testruns:

elm-coverage -- --seed 12345 --fuzz 99

elm-coverage will write an HTML report to .coverage/coverage.html. It is not recommended to version control this directory. In order to open the report once it is generated, you can specify the --open option:

elm-coverage --open

Contribute

Issues and source code is available on github. The source for elm-instrument which is used to actually instrument the sources in order to calculate coverage is also available.

License

elm-coverage is licensed under the BSD-3 license. elm-instrument is licensed under the BSD-3 license.