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

gulp-chutzpah

v1.5.0

Published

A gulp plugin to run javascript tests using Chutzpah test runner

Downloads

1,566

Readme

gulp-chutzpah Build Status

A gulp plugin to run javascript tests using Chutzpah test runner

Installation

npm install gulp-chutzpah

Usage

...with the test files

var gulp = require("gulp"),
    chutzpah = require("gulp-chutzpah");

var opts = {
    executable: "/path/to/chutzpah.console.exe"
};

gulp.task("test", function(){
    gulp.src("./tests/*.js")
    .pipe(chutzpah(opts));
});

...with chutzpah settings file

var gulp = require("gulp"),
    chutzpah = require("gulp-chutzpah");

var opts = {
    executable: "/path/to/chutzpah.console.exe",
    isSettingsFile: true
};

gulp.task("test", function(){
    gulp.src("/path/to/chutzpah-settings.json")
    .pipe(chutzpah(opts));
});

...with exec options (optional)

var opts = {
    executable: "/path/to/chutzpah.console.exe"
    // other options
};

var execOptions = {
    encoding: 'utf8',
    timeout: 0,
    maxBuffer: 200 * 1024
    // other exec options
}

gulp.task("test", function(){
    gulp.src("/my/test/files.extention")
    .pipe(chutzpah(opts, execOptions));
});

Options

The options object must have a property named executable, which is the location of your chutzpah console executable file. Usually, it is chutzpah.console.exe.

You can optionally supply any of the chutzpah command line options, except path.

Here are the options again with their default values:

  • executable : Required. "/path/to/chutzpah.console.exe".
  • isSettingsFile : Conditionally required. Must set to true when using chutzpah settings files to specify test files and/or other settings. Detail about the json settings file can be found here. Important: when this value is set to true, all other settings are ignored (except of course, executable). Default is false.
  • nologo : Do not show the copyright message. Default is false.
  • silent : Do not output running test count. Default is false.
  • teamcity : Forces TeamCity mode (normally auto-detected). Default is false.
  • wait : Wait for input after completion. Default is false.
  • failOnError : Return a non-zero exit code if any script errors or timeouts occurs. Default is false.
  • debug : Print debugging information and tracing to console. Default is false.
  • trace : Logs tracing information to chutzpah.log. Default is false.
  • openInBrowser : Launch the tests in a browser. Default is false. Set true to launch in default browser. You can also set it to your desired browser name like "IE", "Firefox" or "Chrome".
  • parallelism : Max degree of parallelism for Chutzpah. Default is false. Set it any number you want. You can also set it to true, which will be treated as number of CPUs + 1. Note that, if it set to more than 1, the test output may be a bit jumbled.
  • vsoutput : Print output in a format that the VS error list recognizes. Default is false.
  • coverage : Enable coverage collection. Default is false.
  • showFailureReport : Show a failure report after the test run. Usefull if you have a large number of tests. Default is false.
  • settingsFileEnvironment : Sets the environment properties for a chutzpah.json settings file. Default is "". Specify more than one to add multiple environments. Example value: "settingsFilePath;prop1=val1;prop2=val2".
  • junit : output results to JUnit-style XML file. Default is "". Set a file path to generate the file.
  • lcov : outputs results as LCOV data for further processing. Default is "". Set a file path to generate the file.
  • trx : output results to Visual Studio Trx file. Default is "". Set a file path to generate the file.
  • nunit2 : output results to NUnit-style XML file. Default is "". Set a file path to generate the file.
  • coveragehtml : Outputs default Chutzpah coverage HTML. Default is "". Set a file path to generate the file.

Exec Options

This is optional second parameter to chutzpah(). Default options can be found here.