https://github.com/cedmax/qunit-amd-runner
[deprecated] Unit tests runner based on phantomjs supporting AMD pattern.
https://github.com/cedmax/qunit-amd-runner
amd qunit unit-test
Last synced: 18 days ago
JSON representation
[deprecated] Unit tests runner based on phantomjs supporting AMD pattern.
- Host: GitHub
- URL: https://github.com/cedmax/qunit-amd-runner
- Owner: cedmax
- License: mit
- Created: 2014-09-05T14:39:37.000Z (almost 12 years ago)
- Default Branch: master
- Last Pushed: 2018-02-18T04:05:27.000Z (over 8 years ago)
- Last Synced: 2025-08-09T13:55:47.542Z (10 months ago)
- Topics: amd, qunit, unit-test
- Language: JavaScript
- Homepage:
- Size: 11.7 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
[deprecated] QUnit AMD runner
=============
Unit tests runner based on phantomjs supporting AMD pattern.
Offers a node API ready to be integrated in other scripts (grunt/gulp plugins, cli tools, etc)
# Docs
## Installation
`npm install qunit-amd-runner --save-dev`
## Usage
```js
var testRunner = require('qunit-amd-runner');
testRunner({
tests: ['tests/*Test.js'],
include: [
'test/lib/helper.js',
'test/lib/sinon.js' // -> http://sinonjs.org/
],
require: {
baseUrl: 'assets/javascripts/src',
paths: {
jquery: 'public/javascripts/jquery-2.0.0.min',
mustache: 'public/javascripts/mustache',
}
}
}, function callback(result){
if (!result) {
process.exit(1);
} else {
//tests succeeded, do whatever you want
}
});
```
## Arguments
### Options
#### options.include
Type: `Array`
An array of files to be injected in all the test suites.
#### options.tests
Type: `Array`
An array of patterns to retrieve the test files.
Test files are threated as require.js main files
#### options.require
Type: `Object`
RequireJS configuration
Read the [RequireJS documentation](http://www.requirejs.org/)
### Callback
Type: `function`
A callback function to be invoked at the end of the tests exection.
The result is a falsy value if tests failed.