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

jasmine-growl-reporter

Package Overview
Dependencies
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

jasmine-growl-reporter - npm Package Compare versions

Comparing version 0.0.2 to 0.0.3

res/failed.png

23

lib/reporter.js

@@ -5,3 +5,4 @@

deps = deps || {};
var growl = deps.growl || require('growl');
var growl = deps.growl || require('growl'),
path = require('path');

@@ -33,3 +34,4 @@ var GrowlReporter = function() {

name: growlName,
title: growlTitle(this.passedSpecs, this.totalSpecs, this.startedAt)
title: growlTitle(this.passedSpecs, this.totalSpecs, this.startedAt),
image: growlImage(this.passedSpecs, this.totalSpecs)
});

@@ -39,7 +41,8 @@ }

var growlName = 'Jasmine';
var growlName = 'Jasmine',
resDir = path.resolve(__dirname, '../res');
var growlTitle = function(passedSpecs, totalSpecs, startedAt) {
var title = passedSpecs < totalSpecs ? 'FAILED' : 'PASSED';
var title = passed(passedSpecs, totalSpecs) ? 'PASSED' : 'FAILED';
title += ' in ' + ((new Date().getTime() - startedAt.getTime()) / 1000) + 's';

@@ -64,3 +67,15 @@

var growlImage = function(passedSpecs, totalSpecs) {
if (passed(passedSpecs, totalSpecs)) {
return path.join(resDir, 'passed.png');
} else {
return path.join(resDir, 'failed.png');
}
};
var passed = function(passedSpecs, totalSpecs) {
return passedSpecs == totalSpecs;
};
return GrowlReporter;
};

2

package.json
{
"name": "jasmine-growl-reporter",
"version": "0.0.2",
"version": "0.0.3",
"main": "./index.js",

@@ -5,0 +5,0 @@ "scripts": {

# Jasmine Growl Reporter
[![NPM version](https://badge.fury.io/js/jasmine-growl-reporter.png)](http://badge.fury.io/js/jasmine-growl-reporter)
[![Dependency Status](https://gemnasium.com/AlphaHydrae/jasmine-growl-reporter.png)](https://gemnasium.com/AlphaHydrae/jasmine-growl-reporter)
[![Build Status](https://secure.travis-ci.org/AlphaHydrae/jasmine-growl-reporter.png)](http://travis-ci.org/AlphaHydrae/jasmine-growl-reporter)
Growl notifications when running your Jasmine specs.

@@ -13,1 +9,2 @@

* **License:** MIT (see [LICENSE.txt](https://raw.github.com/AlphaHydrae/jasmine-growl-reporter/master/LICENSE.txt))
* **Icons:** http://www.visualpharm.com/must_have_icon_set/

@@ -8,2 +8,3 @@

var injector = require('../lib/reporter').inject,
path = require('path'),
growl = null,

@@ -26,3 +27,5 @@ reporter = null;

passedRegexp = /^PASSED in [\d\.]+s$/,
failedRegexp = /^FAILED in [\d\.]+s$/;
failedRegexp = /^FAILED in [\d\.]+s$/,
passedImage = path.resolve(__dirname, '../res/passed.png'),
failedImage = path.resolve(__dirname, '../res/failed.png');

@@ -39,3 +42,4 @@ beforeEach(function() {

name: title,
title: passedRegexp
title: passedRegexp,
image: passedImage
});

@@ -53,3 +57,4 @@ });

name: title,
title: passedRegexp
title: passedRegexp,
image: passedImage
});

@@ -67,3 +72,4 @@ });

name: title,
title: failedRegexp
title: failedRegexp,
image: failedImage
});

@@ -85,5 +91,6 @@ });

name: title,
title: failedRegexp
title: failedRegexp,
image: failedImage
});
});
});
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