allure-js-commons
Advanced tools
Comparing version 1.1.1 to 1.1.2
@@ -19,3 +19,3 @@ 'use strict'; | ||
this.status = status; | ||
this.stop = Date.now() || timestamp; | ||
this.stop = timestamp || Date.now(); | ||
}; | ||
@@ -22,0 +22,0 @@ |
@@ -11,3 +11,3 @@ 'use strict'; | ||
Test.prototype.setDesctiption = function (description) { | ||
Test.prototype.setDescription = function (description) { | ||
this.description = description; | ||
@@ -14,0 +14,0 @@ }; |
@@ -64,4 +64,4 @@ 'use strict'; | ||
Allure.prototype.setDesctiption = function(description) { | ||
this.getCurrentSuite().currentTest.setDesctiption(description); | ||
Allure.prototype.setDescription = function(description) { | ||
this.getCurrentSuite().currentTest.setDescription(description); | ||
}; | ||
@@ -68,0 +68,0 @@ |
{ | ||
"name": "allure-js-commons", | ||
"version": "1.1.1", | ||
"version": "1.1.2", | ||
"description": "Common helper for writing plugins to allure-framework", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -1,2 +0,2 @@ | ||
# allure-js-commons | ||
# allure-js-commons [![Build Status](https://travis-ci.org/allure-framework/allure-js-commons.svg?branch=master)](https://travis-ci.org/allure-framework/allure-js-commons) | ||
Shared Allure code for javascript frameworks |
@@ -56,3 +56,3 @@ 'use strict'; | ||
Allure.prototype.description = function(description) { | ||
this._allure.setDesctiption(description); | ||
this._allure.setDescription(description); | ||
}; | ||
@@ -59,0 +59,0 @@ |
@@ -134,2 +134,24 @@ 'use strict'; | ||
}); | ||
it('should provide custom step start and stop time', function() { | ||
allure.startStep('test step', 123); | ||
allure.endStep('passed', 130); | ||
expect(allure.getCurrentSuite().currentTest.steps).toEqual([ | ||
joc({ | ||
name: 'test step', | ||
start: 123, | ||
stop: 130 | ||
}) | ||
]); | ||
}); | ||
it('should allow to change test case status after end but only to failed', function() { | ||
var testCase = allure.getCurrentSuite().testcases[0]; | ||
allure.endCase('passed'); | ||
expect(testCase.status).toBe('passed'); | ||
allure.endCase('failed', new Error('test error')); | ||
expect(testCase.status).toBe('failed'); | ||
allure.endCase('passed'); | ||
expect(testCase.status).toBe('failed'); | ||
}); | ||
}); |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
34675
496