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 🙏

© 2026 – Pkg Stats / Ryan Hefner

@taromero/latte

v1.0.2

Published

Testing framework to run mocha-esque specs on Meteor apps.

Readme

Latte

Build Status js-standard-style

What

Testing framework to run mocha-esque specs on Meteor apps., without the need of using Velocity.

Motivation

The aim of this project is to provide a minimal library to just run specs mocha-style, upon running a command.

How to use

  1. npm install latte. For how to install it as a devDependency check below.
  2. npm install chai. Latte needs an assertion library, and I've been using ChaiJS.
  3. Write a spec anywhere in a server directory.
  4. Somewhere in the code (before loading the test files):
  const latte = require('latte')
  Meteor.startup(() => latte.test())
  1. On the command line, run: NODE_ENV=test LATTE_MODE=run meteor --once.

For examples, check sample-app/.

How to install as devDependencies

Meteor filters devDependencies when building, for either production or development modes, so using latte (and eventually chai) as npm devDependencies requires a workaround, by running the test command instead of the run one:

NODE_ENV=test LATTE_MODE=run meteor test --once --driver-package meteor-base

test makes it mandatory to set a Meteor package as a the --driver-package param. Right now it seems you can use meteor-base (or other package declared at .meteor/packages). This is just a workaround, as setting a random package on this parameter doesn't seem to have other effect than preventing the test command from failing.

Workflow

Development (watch-mode)
  1. Run NODE_ENV=test LATTE_MODE=watch meteor.
  2. Write your specs. You'll likely want to use ddescribe to only run that test until you get it right.
  3. Watch the tests run. If you are using Meteor v1.5+ the code reload should be fast.
  4. Fix your code or tests until they are ok.
CI (single-run-mode)
  1. Write your specs.
  2. Run NODE_ENV=test LATTE_MODE=run meteor --once.
  3. Watch test report.
  4. Check the exit code to mark the build state.

Highlights

  • It runs inside Meteor's context (any variable that is available when running the app is available on the tests).
  • It connects to a separate DB from development's one (though on the same Mongo server). You can specify which DB to use by setting T.testingDbName. The default is meteor_latte. And switches back to develop's db after running tests.
  • It cleans up the database upon start, and after running each describe block. So the DB state is clean for each test block.
  • Simple (yet nice?) console based report.
Run selected tests

2 selection options:

  • ddescribe. This can only be used on unnested describe blocks at the moment.
  • iit. This can be used on any it block.

Also, you can select specific/s suites from the command line. To do so, you must put a label for the suites you want to include/exclude. Usage example:

describe('a suite name', function() { ... })

From the command line:

  • run only a list a suites: NODE_ENV=test LATTE_MODE=run LATTE_SUITES='["a suite name"]' meteor --once.
  • run all but a list a suites: NODE_ENV=test LATTE_MODE=run LATTE_SUITES='["~a suite name"]' meteor --once.

Gotchas

  • afterEach must be declared before it blocks in each describe or context block.
  • Cannot run assertions inside before or after blocks.
  • Initially designed to work only on server side.
  • If the internet connection is flaky, it might take some seconds to end the Meteor process (this is due to some Meteor's internals).

Original motivation

https://slides.com/canotto90/deck