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

jasmine-node

Package Overview
Dependencies
Maintainers
2
Versions
72
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

jasmine-node - npm Package Compare versions

Comparing version 1.11.0 to 1.12.0

bower.json

13

lib/jasmine-node/autotest.js

@@ -30,10 +30,12 @@ var walkdir = require('walkdir');

var last_run_successful = false;
var run_everything = function() {
// run the suite when it starts
var argv = [].concat(baseArgv);
run_external(argv.shift(), argv);
run_external(argv.shift(), argv, function (code) {
last_run_successful = code === 0
});
}
var last_run_succesful = true;
exports.start = function(loadpaths, watchFolders, patterns) {

@@ -64,8 +66,7 @@ var watchPatterns;

if(code == 0) {
if(!last_run_succesful) {
if(!last_run_successful) {
run_everything();
}
last_run_succesful = true;
} else {
last_run_succesful = false;
last_run_successful = false;
}

@@ -72,0 +73,0 @@ });

@@ -200,3 +200,3 @@ var util,

var onComplete = function(runner, log) {
util.print('\n');
process.stdout.write('\n');
if (runner.results().failedCount == 0) {

@@ -245,3 +245,3 @@ exitCode = 0;

function help(){
util.print([
process.stdout.write([
'USAGE: jasmine-node [--color|--noColor] [--verbose] [--coffee] directory'

@@ -279,4 +279,4 @@ , ''

function printVersion(){
console.log("1.11.0");
console.log("1.12.0");
process.exit(0);
}

@@ -40,4 +40,3 @@ var fs = require('fs');

jasmine.loadHelpersInFolder=function(folder, matcher)
{
jasmine.loadHelpersInFolder = function(folder, matcher) {
// Check to see if the folder is actually a file, if so, back up to the

@@ -49,2 +48,3 @@ // parent directory and find some helpers

}
var helpers = [],

@@ -56,8 +56,16 @@ helperCollection = require('./spec-collection');

for (var i = 0, len = helpers.length; i < len; ++i)
{
for (var i = 0, len = helpers.length; i < len; ++i) {
var file = helpers[i].path();
var helper= require(file.replace(/\.*$/, ""));
for (var key in helper)
try {
var helper = require(file.replace(/\.*$/, ""));
} catch (e) {
console.log("Exception loading helper: " + file)
console.log(e);
throw e; // If any of the helpers fail to load, fail everything
}
for (var key in helper) {
global[key]= helper[key];
}
}

@@ -123,3 +131,3 @@ };

} else if(isVerbose) {
jasmineEnv.addReporter(new jasmine.TerminalVerboseReporter({ print: util.print,
jasmineEnv.addReporter(new jasmine.TerminalVerboseReporter({ print: print,
color: showColors,

@@ -129,3 +137,3 @@ onComplete: done,

} else {
jasmineEnv.addReporter(new jasmine.TerminalReporter({print: util.print,
jasmineEnv.addReporter(new jasmine.TerminalReporter({print: print,
color: showColors,

@@ -194,4 +202,8 @@ includeStackTrace: includeStackTrace,

function print(str) {
process.stdout.write(util.format(str));
}
for ( var key in jasmine) {
exports[key] = jasmine[key];
}

@@ -20,3 +20,3 @@ (function() {

jasmineNode.TerminalReporter = function(config) {
this.print_ = config.print || util.print;
this.print_ = config.print || function (str) { process.stdout.write(util.format(str)); };
this.color_ = config.color ? this.ANSIColors : this.NoColors;

@@ -23,0 +23,0 @@

@@ -70,4 +70,3 @@ exports.executeJsRunner = function(specCollection, done, jasmineEnv, setupFile) {

specCollection.getSpecs().forEach(function(s){
var script = fs.readFileSync(s.path(), 'utf8'),
wrappedScript;
var script = fs.readFileSync(s.path(), 'utf8');

@@ -78,4 +77,2 @@ if (s.filename().substr(-6).toLowerCase() == 'coffee') {

wrappedScript = template + script;
var newContext = buildNewContext(s);

@@ -85,3 +82,5 @@ newContext.setTimeout = jasmine.getGlobal().setTimeout;

vm.runInNewContext(wrappedScript, newContext, s.path());
var vmContext = vm.createContext(newContext);
vm.runInContext(template, vmContext);
vm.runInContext(script, vmContext, s.path());
});

@@ -88,0 +87,0 @@

{
"name": "jasmine-node",
"version": "1.11.0",
"version": "1.12.0",
"description": "DOM-less simple JavaScript BDD testing framework for Node",

@@ -5,0 +5,0 @@ "contributors": [

@@ -17,2 +17,3 @@ jasmine-node

----------
* Growl notifications with the `--growl` flag (requires Growl to be installed)
* Ability to test specs written in Literate Coffee-Script

@@ -50,3 +51,4 @@ * Teamcity Reporter reinstated.

Write the specifications for your code in `*.js` and `*.coffee` files in the `spec/` directory.
You can use sub-directories to better organise your specs.
You can use sub-directories to better organise your specs. In the specs use `describe()`, `it()` etc. exactly
as you would in client-side jasmine specs.

@@ -238,2 +240,7 @@ **Note**: your specification files must be named as `*spec.js`, `*spec.coffee` or `*spec.litcoffee`,

* _1.12.0_
* Changed `util.print` to `stdout.write` (thanks to [nrstott](https://github.com/nrstott))
* Don’t affect line numbers with --requireJsSetup (thanks to [daviddaurelio](https://github.com/davidaurelio))
* Catch errors when loading helpers (thanks to [pimterry](https://github.com/pimterry))
* Keep autotesting until all tests have passed (thanks to [notclive](https://github.com/notclive))
* _1.11.0 - Added Growl notification option `--growl` (thanks to

@@ -240,0 +247,0 @@ [AlphaHydrae](https://github.com/AlphaHydrae))_

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