lazd / karma-benchmark-example

A karma-benchmark example

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

karma-benchmark-example

A karma-benchmark example

What is this?

This is a simple example that shows how to use karma-benchmark with the karma-benchmark-reporter and karma-junit-reporter reporters.

It pits native Array methods against a home-made utility library.

Running the example

First, install dependencies:

npm install

Run all browsers

This will run benchmarks in Chrome and Firefox:

grunt bench

Run a single browser

You can pass chrome or firefox.

grunt bench:chrome

Run directly from Karma

Grunt is not required. You can simply run Karma directly:

karma start

CI run with JUnit report

This will run benchmarks in PhantomJS and write test results to results/junit-benchmark-results.xml:

grunt bench:ci

About

A karma-benchmark example

License:MIT License


Languages

Language:JavaScript 100.0%