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 - npm Package Compare versions

Comparing version 2.1.0 to 3.0.0-rc1

64

index.js
'use strict';
var path = require('path'),
var _ = require('lodash'),
exec = require('child_process').execSync,
execFile = require('child_process').execFile,
fs = require('fs'),
glob = require('glob'),
gutil = require('gulp-util'),
through = require('through2'),
glob = require('glob'),
handlebar = require('handlebars'),
fs = require('fs'),
execFile = require('child_process').execFile,
exec = require('child_process').execSync,
requireUncached = require('require-uncached');
Jasmine = require('jasmine'),
path = require('path'),
through = require('through2');

@@ -176,5 +177,3 @@ /*

module.exports = function (options) {
var filePaths = [],
miniJasmineLib = requireUncached('minijasminenode2'),
terminalReporter = require('./lib/terminal-reporter.js').TerminalReporter;
var filePaths = [];

@@ -250,31 +249,28 @@ gulpOptions = options || {};

miniJasmineLib.addSpecs(file.path);
filePaths.push(file.path);
filePaths.push(path.relative(process.cwd(), file.path));
callback(null, file);
},
},
function(callback) {
gutil.log('Running Jasmine with minijasminenode2');
gutil.log('Running Jasmine in Node');
try {
miniJasmineLib.executeSpecs({
reporter: terminalReporter,
showColors: true,
includeStackTrace: gulpOptions.includeStackTrace,
onComplete: function() {
if(gulpOptions.keepRunner) {
try {
compileRunner({
files: filePaths,
onComplete: function() {
callback(null);
}
});
} catch(error) {
callback(new gutil.PluginError('gulp-jasmine-phantom', error));
}
} else {
callback(null);
}
}
var jasmine = new Jasmine(),
terminalReporter = require('./lib/terminal-reporter.js').TerminalReporter;
jasmine.addReporter(new terminalReporter(_.defaults(gulpOptions, {showColors: true})));
jasmine.loadConfig({
random: _.get(gulpOptions, 'random', false),
spec_files: filePaths
});
if (_.has(gulpOptions, 'seed')) {
jasmine.seed(gulpOptions.seed);
}
jasmine.onComplete(function(passed) {
callback(null);
});
jasmine.execute();
} catch(error) {

@@ -281,0 +277,0 @@ callback(new gutil.PluginError('gulp-jasmine-phantom', error));

@@ -33,3 +33,3 @@ var noopTimer = {

this.jasmineDone = function() {
this.jasmineDone = function(result) {
printNewline();

@@ -70,2 +70,7 @@ for (var i = 0; i < failedSpecs.length; i++) {

if (result && result.order && result.order.random) {
print('Randomized with seed ' + result.order.seed);
printNewline();
}
done(failureCount === 0);

@@ -72,0 +77,0 @@ };

{
"name": "gulp-jasmine-phantom",
"version": "2.1.0",
"version": "3.0.0-rc1",
"description": "Jasmine 2.0 suite runner, optionally with PhantomJS",

@@ -25,8 +25,8 @@ "license": "MIT",

"dependencies": {
"glob": "^4.0.6",
"gulp-util": "^3.0.0",
"minijasminenode2": "dflynn15/minijasminenode",
"through2": "^0.6.1",
"handlebars": "^2.0.0",
"require-uncached": "^1.0.2",
"glob": "^4.0.6"
"jasmine": "dflynn15/jasmine-npm",
"lodash": "^4.3.0",
"through2": "^0.6.1"
},

@@ -37,5 +37,4 @@ "devDependencies": {

"gulp-jasmine": "^1.0.1",
"jasmine": "^2.0.1",
"jasmine-fixture": "^1.0.8"
}
}

@@ -84,8 +84,2 @@ gulp-jasmine-phantom

#### jasmineVersion
Type: `string` <br />
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

@@ -139,2 +133,21 @@ Type: `boolean` <br />

#### jasmineVersion (integration tests only)
Type: `string` <br />
Default: '2.0'
**Only use in combination with `integration: true`**
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.
#### random (unit tests only)
Type: 'boolean'<br />
Default: false
Allows you to run the unit tests in a semi-random order. The random seed will be printed out after the tests have completed to allow for easier debugging.
#### seed (unit tests only)
Type: 'number'<br />
Provides a given seed to Jasmine to run the tests in.
Technologies Used

@@ -141,0 +154,0 @@ -----------------

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