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

fluid-testem

v2.2.1

Published

A library to assist in using Testem within the Fluid ecosystem.

Downloads

20

Readme

fluid.testem

This library provides a Fluid component and static functions that assist in using Testem.

Key Features

  1. Provides a mechanism to collect client-side code coverage data and combine that with browser coverage.
  2. Provides the ability to launch and wait for server-side components to start up before each test run.
  3. Provides the ability to safely shut down server-side test fixtures after each test run.
  4. Provides cleanup mechanisms to remove temporary browser content after each test run.

Usage instructions

To use this grade from Testem, install this package as a development dependency using a command like npm install --save-dev fluid-testem. Note: There is currently a bug in newer versions of Testem, if you use anything higher than version 1.13.0, you may experience hangs when attempting to quit Testem from the console.

Once you have Testem installed, you will need to create a javascript configuration file, which will allow you to make use of the dynamic configuration options available via the testem.js file.

The most basic example of a file might look something like:

var fluid = require("infusion");
fluid.require("%fluid-testem");

var my  = fluid.registerNamespace("my");
fluid.defaults("my.testem.grade", {
    gradeNames: ["fluid.testem"],
    testPages:  ["tests/my-awesome-test.html"]
});

module.exports = my.testem.grade().getTestemOptions();

To make use of the code coverage support provided by fluid.testem, you must load the "coverage sender" in your HTML fixtures. See the coverage docs for details.

Once you have created your configuration javascript file, you can launch Testem with your configuration.

Browser Coverage Only

If you only want to check the coverage of browser code, you can run your tests using a command like the following:

node node_modules/testem/testem.js ci --file path/to/your-testem-config.js

If you save your configuration to the file name testem.js in your package root, you can launch Testem using a command like node node_modules/testem/testem.js or node node_modules/testem/testem.js ci.

Browser and Node Coverage

If you are testing browser code in combination with node code, please see the example in the Testem component docs.

More Information

For more information, check out the documentation links below:

Running the Tests in this Package

You can run the tests using the command npm test. You are not required to have Testem installed globally to run the tests.

Running the tests in "Headless" Mode

The default testem component provided by this package supports an environment variable that can be used to only run tests in a subset of available browsers. (See the component documentation for more details). Setting the TESTEM_ENVIRONMENT environment variable to "headless" will run tests using only headless Chrome and Firefox.

Note: because of a bug in Testem, tests that use Firefox require manual input to complete on Windows. Setting the TESTEM_ENVIRONMENT environment variable to "headless" will allow tests to run unattended on Windows.