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

grunt-qunit-serverless

v0.3.3

Published

A serverless version of the grunt-qunit task

Downloads

25

Readme

grunt-qunit-serverless Build Status

A serverless version of the grunt-contrib-qunit task. The intent of this task is to be able to run your qunit tests without spinning up a web server.

Installation

npm install grunt-qunit-serverless --save

Reporting

Normal

Normal Logging

Verbose

Verbose Logging

Example Config

var cfg = {
	
	"qunit-serverless": {
		all: {
			options: {
				headerScript: "window.headerObj = true;",
				includeFiles: [path.join("test", "res", "includes", "*.js")],
				testFiles: [path.join("test", "res", "tests", "*.js")],
				templateFiles: [path.join("test", "res", "templates", "*.stache")]
			}
		}
	}
};

grunt.initConfig(cfg);

grunt.loadNpmTasks("grunt-qunit-serverless");

grunt.registerTask("default", ["qunit-serverless"]);

Options

qunitJs

The path to the qunit.js file you would like to use. Otherwise, we will default to one that is included with the npm package.

qunitCss

The path to the qunit.css file you would like to use. Otherwise, we will default to one that is included with the npm package.

qunitBridge

The path to the PhantomJS to QUnit bridge script file you would like to use. Otherwise, we will default to noe that is included with the npm package that is based on one from grunt-contrib-qunit.

qunit-filter

A test filter to pass to the qunit runner; can limit the number of tests you run. Also can be passed in via command line as --qunit-filter="something".

pageTemplate

The path to an underscore template file that will build the qunit test page. Defaults to one that is included with the npm package.

headerScript

Raw JavaScript that you would like to include at the top of the page. Not intended to be very long. See other options for how to include files (such as libraries).

includeFiles

A grunt.file.expand(...) argument array describing the files you'd like to include before qunit.

testFiles

A grunt.file.expand(...) argument array describing the test files to include.

templateFiles

A grunt.file.expand(...) argument array describing template files you'd like to include after the test files.

buildOnly

A boolean value that when set to a truthy value indicates that only the html file should be built and its path output to the console.

Reporters

As of version 0.2.0 you can build your own reporter based on a simple interface shown below, the default is a Spec based reported similar to the Mocha Spec reporter.

{
    start: function(pageUrl) {

    },
    complete: function(state) {

    },
    moduleStart: function(name) {

    },
    moduleEnd: function(name, failed, passed, total) {

    },
    testStart: function(name) {

    },
    testDone: function(name) {

    },
    assertionPassed: function(message) {

    },
    assertionFailed: function(actual, expected, message, source) {

    }
}

License

This library is licensed under the MIT License. Portions of this code were taken from the grunt-contrib-qunit task.