allure-js-commons
Advanced tools
Comparing version 1.1.6 to 1.2.0
@@ -63,2 +63,6 @@ 'use strict'; | ||
var suite = this.getCurrentSuite(); | ||
if(!(suite.currentStep instanceof Step)) { | ||
console.warn('allure-js-commons: Unexpected endStep(). There is no any steps running'); | ||
return; | ||
} | ||
suite.currentStep.end(status, timestamp); | ||
@@ -65,0 +69,0 @@ suite.currentStep = suite.currentStep.parent; |
{ | ||
"name": "allure-js-commons", | ||
"version": "1.1.6", | ||
"version": "1.2.0", | ||
"description": "Common helper for writing plugins to allure-framework", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
'use strict'; | ||
/*eslint-env jasmine */ | ||
var proxyquire = require('proxyquire'); | ||
@@ -149,24 +148,2 @@ var Allure = proxyquire('../index', {'fs-extra': require('./helpers/mock-fs')}); | ||
}); | ||
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'); | ||
}); | ||
}); |
Sorry, the diff of this file is not supported yet
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
19882
19
548