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

allure-js-commons

Package Overview
Dependencies
Maintainers
1
Versions
84
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

allure-js-commons - npm Package Compare versions

Comparing version 1.2.0 to 1.2.1

beans/description.js

14

beans/test.js
'use strict';
var Description = require('./description');
var STATUSES = ['passed', 'pending', 'skipped', 'failed', 'broken'];

@@ -12,4 +15,4 @@ function Test(name, timestamp) {

Test.prototype.setDescription = function (description) {
this.description = description;
Test.prototype.setDescription = function (description, type) {
this.description = new Description(description, type);
};

@@ -55,3 +58,2 @@

title: this.name,
description: this.description,
labels: {

@@ -78,5 +80,11 @@ label: this.labels.map(function (label) {

};
if (this.failure) {
result.failure = this.failure;
}
if (this.description) {
result.description = this.description.toXML();
}
return result;

@@ -83,0 +91,0 @@ };

@@ -71,4 +71,4 @@ 'use strict';

Allure.prototype.setDescription = function(description) {
this.getCurrentTest().setDescription(description);
Allure.prototype.setDescription = function(description, type) {
this.getCurrentTest().setDescription(description, type);
};

@@ -75,0 +75,0 @@

{
"name": "allure-js-commons",
"version": "1.2.0",
"version": "1.2.1",
"description": "Common helper for writing plugins to allure-framework",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -64,4 +64,4 @@ 'use strict';

Allure.prototype.description = function(description) {
this._allure.setDescription(description);
Allure.prototype.description = function(description, type) {
this._allure.setDescription(description, type);
};

@@ -68,0 +68,0 @@

@@ -49,2 +49,23 @@ var proxyquire = require('proxyquire');

});
it('should add text type description by default', function() {
var testCase = allure.getCurrentSuite().testcases[0];
var description = 'test desc';
allure.setDescription(description);
expect(testCase.description.value).toBe(description);
expect(testCase.description.type).toBe('text');
});
it('should add description with markdown', function() {
var testCase = allure.getCurrentSuite().testcases[0];
var description = 'test desc';
var type = 'markdown';
allure.setDescription(description, type);
expect(testCase.description.value).toBe(description);
expect(testCase.description.type).toBe(type);
});
});

@@ -17,8 +17,7 @@ 'use strict';

it('should add labels and description', function() {
runtime.description('test desc');
it('should add labels', function() {
runtime.feature('labels');
runtime.story('add');
expect(allure.getCurrentSuite().currentTest).toEqual(joc({
description: 'test desc',
labels: [

@@ -31,2 +30,25 @@ {name: 'feature', value: 'labels'},

it('should add text type description by default', function() {
var description = 'test desc';
runtime.description(description);
expect(allure.getCurrentSuite().currentTest.description).toEqual(joc({
type: 'text',
value: description
}));
});
it('should add description with markdown', function() {
var description = 'test desc';
var type = 'markdown';
runtime.description(description, type);
expect(allure.getCurrentSuite().currentTest.description).toEqual(joc({
type: type,
value: description
}));
});
it('should add parameters', function() {

@@ -33,0 +55,0 @@ runtime.addArgument('test', 'value');

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