JSPM Testem
This project automates the setup of tests for JSPM-powered projects using Testem.
It supports the following test frameworks:
The tests run in the browser and many browsers are supported with Testem launchers: https://github.com/testem/testem#launchers
Installation
jspm-testem is both a JSPM-compatible JS module and a cli command. The cli command automates the setup of the tests and the JS module integrates Testem, JSPM and test frameworks during the runtime.
To install the CLI tool:
npm install jspm-testem -g
Usage
Assume that jspm-project-dir
is the root folder of your JSPM module. Run the following command to add Mocha(default) tests for the project
cd jspm-project-dirjspm-testem
This will create all files required for Testem and install required JSPM dependencies. If you want to use a framework other than mocha:
jspm-testem --framework=qunit
By default the command does not override existing files. If you want to run the command again and update the test files, run:
jspm-testem --framework=qunit --force=true
Example project
The test project here https://github.com/OrKoN/simple-jspm-project has tests enabled by jspm-testem
in the master
branch. The without_tests
branch contains the version of the project before the tests were added: https://github.com/OrKoN/simple-jspm-project/tree/without_tests
Status
The project is in very early stages. The API and functionality may change. If you think that some configuration options are missing or if you have troubles adapting jspm-testem
for your project, please let me know via Issues or Pull Requests on Github.
LICENSE
MIT