Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

gulp-jasmine-phantom

Package Overview
Dependencies
Maintainers
1
Versions
34
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

gulp-jasmine-phantom

Jasmine 2.0 suite runner, optionally with PhantomJS

  • 1.3.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
30
decreased by-62.03%
Maintainers
1
Weekly downloads
 
Created
Source

gulp-jasmine-phantom

A gulp plugin that runs Jasmine tests with either PhantomJS or minijasminenode2.

Dependencies

Before you install gulp-jasmine-phantom 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.

Install

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

Usage

By default, gulp-jasmine-phantom runs your tests with minijasminenode and not phantomjs. This is an effort to keep your tasks running as quickly as possible!

Basic usage:

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

gulp.task('default', function () {
  return gulp.src('spec/test.js')
          .pipe(jasmine());
});

To use phantomjs for tests (ie: integration tests) use the following setup:

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

gulp.task('default', function() {
  return gulp.src('spec/test.js')
          .pipe(jasmine({
            integration: true
          }));
});

Also, remember you can always run any multitude of tests using different Gulp tasks. For example, running unit tests and integration tests asynchronously.

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

gulp.task('unitTests', function () {
  return gulp.src('spec/test.js')
          .pipe(jasmine());
});

gulp.task('integrationTests', function() {
  return gulp.src('spec/test.js')
          .pipe(jasmine({
            integration: true
          }));
});

Options

jasmineVersion

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.

integration

Type: boolean
Default: false

Run your tests with phantomjs

keepRunner

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.

includeStackTrace

Type: boolean
Default: false

Prints out a longer stack trace for errors.

abortOnFail

Type: boolean
Default: false

Currently built with integration mode only
Exits Gulp with an status of 1 that will halt any further Gulp tasks.

specHtml

Type: string
Default: null

Only use in combination with integration: true

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

vendor

Type: string | array
Default: null

Only use in combination with integration: true

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

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

Technologies Used

  • Node
  • Gulp

Keywords

FAQs

Package last updated on 22 Jul 2015

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc