karma-testdouble
This package is create as a convenient helper to load testdouble.js
in karma
so that it doesn't have to go through a compilation step via browserify
which
is slow.
Installation
Install the plugin from npm:
npm install testdouble --save-devnpm install karma-testdouble --save-dev
Add testdouble
to the frameworks
key in your Karma configuration:
= configset # frameworks to use frameworks: 'mocha''testdouble' # ...
Usage
You can use use td
without doing an import.
For example, performAction
is a function that will execute load
when it is passed in:
td.verify
is used to ensure that load is executed with parameter of null
.
License
MIT