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 🙏

© 2025 – Pkg Stats / Ryan Hefner

maf3-test-runner

v0.1.0

Published

A BDD test runner integrating Karma with MAF3 applications

Downloads

6

Readme

MAF3 Test Runner

Build Status

Lint and Unit Testing for the MAF 3 framework

Prerequisites

After creating Your application

  • To get things started it is simplest to install the maf3-test-runner straight away so that the examples directory is available immediately under node_modules/maf3-test-runner
npm install maf3-test-runner
  • Create package.json in the root of the project to specify dependencies and test scripts

    • Copy examples/package.json
    • Replace YOUR_APPLICATION_NAME in the name field
  • Add node_modules and reports to your .gitignore file

node_modules
reports
  • Install dependencies
npm install
  • Create karma.conf.js in the root of the project to configure the Karma test runner

    • Copy examples/karma.conf.js
    • Under preprocessors set the path to the code to be covered by tests
    preprocessors: {
      '*/.html': [],
      'path/to/your/source/code/for/coverage/**/*.js': 'coverage'
    },
    • Optionally, change the coverage thresholds ;)
    thresholdReporter: {
      statements: 100,
      branches: 100,
      functions: 100,
      lines: 100
    },
  • Create test.html in the root of the project to be the bootstrap for the tests

    • Copy examples/test.html
    • Note the name of the application set to autostart, you will create this application later
  • Create Gruntfile.js in the root of the project to implement the test scripts

    • Copy examples/Gruntfile.js
    • Replace YOUR_APPLICATION_NAME in the files array
  • Create sonar-project.properties in the root of the project to enable sonar analysis

    • Copy examples/sonar-project.properties
    • Replace YOUR_COMPANY_NAME with your comapny name, YOUR_APPLICATION_NAME and YOUR APPLICATION NAME with your application name
  • Create a test application unders apps to contain the tests,

    • Copy examples/apps/com.maf3-test-runner.widget.Test to match the application set to autostart
    • Add the paths to your source files and tests to the includes in Contents/Javascript/init.js
    • Start adding tests!

Running tests, etc...

The following scripts will be available using npm

npm test

Run the tests once

npm run-script watch

Watch the configured files from Gruntfile.js and run tests whenever they change.

npm run-script karma

Start the Karma server and leave it running - useful for debugging as then you can connect any browser to http://localhost:9876 and run the tests or use the debug feature of Karma.

npm run-script karma-run

Will start tests in the connected browsers if the Karma server has been started with npm run-script karma

npm start

Will start a web server exposing the root of your project at http://localhost:8000. Use this to run your application in a browser.

Contributing

In lieu of a formal styleguide, take care to maintain the existing coding style. Add unit tests for any new or changed functionality. Lint and test your code using:

$ npm test

License

Copyright © 2014 Liberty Global

Licensed under the MIT license.