Jasmine 2.0 suite runner with PhantomJS and requirejs
Last updated 4 years ago by dunal .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install gulp-jasmine-phantom-requirejs 
SYNC missed versions from official npm registry.


A gulp plugin that runs Jasmine tests with PhantomJS. Both specs and tested units must be amd modules.


This module uses execSync which is not available in any version of Node under 0.12.x. If you have any specific concerns about upgrading versions of Node or reasons not use execSync feel free to open an issue!

Before you install gulp-jasmine-phantom-requirejs please ensure that you have PhantomJS installed on your machine. The plugin assumes that the phantomjs binary is available in the PATH and executable from the command line.

If not, ensure you at least have phantomjs as an npm dependency. The module checks in ./node_modules/phantomjs for an executable if you do not have it installed globally.

**If you do not have phantomjs installed please install following these directions.


$ npm install --save-dev gulp-jasmine-phantom-requirejs


Basic usage:

var gulp = require('gulp');
var jasmine = require('gulp-jasmine-phantom-requirejs');

gulp.task('default', function () {
  return gulp.src('spec/test.js')
            vendor: [
            abortOnFail: true,
            requireConfig': {
              baseUrl: 'src/js',
              shim: {
                'bootstrap': ['jquery'],
                'scrollup': ['jquery'],
                'node-diff-match-patch': {
                    init: function () {
                        return new this.diff_match_patch();
              paths: {
                'bootstrap': 'node_modules/bootstrap/dist/js/bootstrap',
                'node-diff-match-patch': 'node_modules/node-diff-match-patch/diff_match_patch'



Type: boolean | string
Default: false

Keep the specRunner.html file after build. If given a string, it will keep the runner at the string path.


Type: boolean
Default: false

Prints out a longer stack trace for errors.


Type: boolean
Default: false

Exits Gulp with an status of 1 that will halt any further Gulp tasks.


Type: string
Default: null

Allows you to specify the HTML runner that Jasmine uses during tests.


Type: string | array
Default: null

Allows to load scripts before testing process.


Type: string
Default: '/lib/jasmine-runner.js'

Allows you to specify the javascript runner that jasmine uses when running tests.

A list of vendor scripts to import into the HTML runner, either as file globs (e.g. "**/*.js") or fully-qualified URLs (e.g. "").

This option accepts either a single string or an array of strings (e.g. ["test/*.js", ""]).


Type: string
Default: '2.0'

Specifies the version of Jasmine you want to run. Possible options are in the vendor/ folder. Just specify what 2.x minor release you want.


Type: Object

Config for requirejs. All paths will be resolved relative to working dir and dirs specified in serverRoots.


Type: Array
Default: []

List of additional directories with sources. Files from specRunner will be firstly searched in these paths.


Type: boolean
Default: false

Runs server to be tested in browser, skipping running in PhantomJS.


Type: number
Default: auto detected free port

TCP port for spec server

Technologies Used

  • Node
  • Gulp

Current Tags

  • 4.0.1                                ...           latest (4 years ago)

10 Versions

  • 4.0.1                                ...           4 years ago
  • 3.0.9                                ...           4 years ago
  • 3.0.8                                ...           4 years ago
  • 3.0.7                                ...           4 years ago
  • 3.0.6                                ...           4 years ago
  • 3.0.5                                ...           4 years ago
  • 3.0.4                                ...           4 years ago
  • 3.0.2                                ...           4 years ago
  • 3.0.1                                ...           4 years ago
  • 3.0.0                                ...           4 years ago
Maintainers (1)
Today 0
This Week 0
This Month 2
Last Day 0
Last Week 1
Last Month 20
Dependencies (11)
Dev Dependencies (2)
Dependents (0)

Copyright 2014 - 2017 © |