New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

jasmine-bamboo-reporter

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

jasmine-bamboo-reporter

A reporter for Jasmine which produces a report compatible with Atlassian Bamboo Mocha Test Parser.

  • 0.0.2
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

jasmine-bamboo-reporter

view on npm npm module downloads per month Dependency status

A reporter for Jasmine which produces a report compatible with Atlassian Bamboo Mocha Test Parser. It supports 'test sharding' or multiple instances of Jasmine running via Protractor. This support is handled by locking the results file and then merging with any previous results.

Installation

npm install jasmine-bamboo-reporter

Usage

Jasmine Usage

var JSONReporter = require('jasmine-bamboo-reporter');
jasmine.getEnv().addReporter(new JSONReporter({
	file: 'jasmine-results.json', // by default it writes to jasmine.json
	beautify: true,
	indentationLevel: 4 // used if beautify === true
}));

//ensure there are no lock files and no previous results to merge against.
if (fs.existsSync("jasmine-results.json.lock")) fs.unlinkSync("jasmine-results.json.lock");
if (fs.existsSync("jasmine-results.json")) fs.unlinkSync("jasmine-results.json");

Protractor/Jasmine Usage

// in Protractor conf
var JSONReporter = require('jasmine-bamboo-reporter');
var fs = require('fs');

exports.config = {

framework: 'jasmine2',

...

beforeLaunch: function () {
    //clean up any residual/leftover from a previous run. Ensure we have clean
    //files for both locking and merging.
    if (fs.existsSync('jasmine-results.json.lock')) {
      fs.unlinkSync('jasmine-results.json.lock');
    }
    if (fs.existsSync('jasmine-results.json')) {
      fs.unlink('jasmine-results.json');
    }
},
  
onPrepare: function() {
	jasmine.getEnv().addReporter(new JSONReporter({
		file: 'jasmine-results.json', // by default it writes to jasmine.json
		beautify: true,
		indentationLevel: 4 // used if beautify === true
	}));
}

License

MIT

Keywords

FAQs

Package last updated on 11 Feb 2017

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