allure-js-commons
Advanced tools
Comparing version 2.0.0-beta.7 to 2.0.0-beta.8
@@ -9,3 +9,3 @@ import { ExecutableItemWrapper } from "./ExecutableItemWrapper"; | ||
startGroup(name?: string): AllureGroup; | ||
startTest(name?: string): AllureTest; | ||
startTest(name?: string, start?: number): AllureTest; | ||
endGroup(): void; | ||
@@ -12,0 +12,0 @@ get uuid(): string; |
@@ -18,4 +18,4 @@ "use strict"; | ||
} | ||
startTest(name) { | ||
const test = new AllureTest_1.AllureTest(this.runtime); | ||
startTest(name, start) { | ||
const test = new AllureTest_1.AllureTest(this.runtime, start); | ||
this.testResultContainer.children.push(test.uuid); | ||
@@ -22,0 +22,0 @@ test.name = name || "Unnamed"; |
@@ -6,4 +6,4 @@ import { ExecutableItemWrapper } from "./ExecutableItemWrapper"; | ||
private readonly testResult; | ||
constructor(runtime: AllureRuntime); | ||
endTest(): void; | ||
constructor(runtime: AllureRuntime, start?: number); | ||
endTest(stop?: number): void; | ||
get uuid(): string; | ||
@@ -10,0 +10,0 @@ set historyId(id: string); |
@@ -7,10 +7,10 @@ "use strict"; | ||
class AllureTest extends ExecutableItemWrapper_1.ExecutableItemWrapper { | ||
constructor(runtime) { | ||
constructor(runtime, start = Date.now()) { | ||
super(constructors_1.testResult()); | ||
this.runtime = runtime; | ||
this.testResult = this.wrappedItem; | ||
this.testResult.start = Date.now(); | ||
this.testResult.start = start; | ||
} | ||
endTest() { | ||
this.testResult.stop = Date.now(); | ||
endTest(stop = Date.now()) { | ||
this.testResult.stop = stop; | ||
this.runtime.writeResult(this.testResult); | ||
@@ -17,0 +17,0 @@ } |
@@ -17,3 +17,3 @@ import { StatusDetails, StepResult, FixtureResult, TestResult, Status, Stage, ContentType } from "./model"; | ||
addAttachment(name: string, type: ContentType, fileName: string): void; | ||
startStep(name: string): AllureStep; | ||
startStep(name: string, start?: number): AllureStep; | ||
wrap<T>(fun: (...args: any[]) => any): (...args: any[]) => any; | ||
@@ -23,4 +23,4 @@ } | ||
private readonly stepResult; | ||
constructor(stepResult: StepResult); | ||
endStep(): void; | ||
constructor(stepResult: StepResult, start?: number); | ||
endStep(stop?: number): void; | ||
} |
@@ -47,6 +47,6 @@ "use strict"; | ||
} | ||
startStep(name) { | ||
startStep(name, start) { | ||
const result = constructors_1.stepResult(); | ||
this.info.steps.push(result); | ||
const allureStep = new AllureStep(result); | ||
const allureStep = new AllureStep(result, start); | ||
allureStep.name = name; | ||
@@ -97,9 +97,9 @@ return allureStep; | ||
class AllureStep extends ExecutableItemWrapper { | ||
constructor(stepResult) { | ||
constructor(stepResult, start = Date.now()) { | ||
super(stepResult); | ||
this.stepResult = stepResult; | ||
this.stepResult.start = Date.now(); | ||
this.stepResult.start = start; | ||
} | ||
endStep() { | ||
this.stepResult.stop = Date.now(); | ||
endStep(stop = Date.now()) { | ||
this.stepResult.stop = stop; | ||
} | ||
@@ -106,0 +106,0 @@ } |
@@ -26,3 +26,3 @@ "use strict"; | ||
writeEnvironmentInfo(info) { | ||
const text = properties_1.stringify(info, { unicode: true }); | ||
const text = properties_1.stringify(info, { unicode: true }).toString(); | ||
const path = this.buildPath("environment.properties"); | ||
@@ -29,0 +29,0 @@ fs_1.writeFileSync(path, text); |
{ | ||
"name": "allure-js-commons", | ||
"version": "2.0.0-beta.7", | ||
"version": "2.0.0-beta.8", | ||
"description": "Allure JS Commons", | ||
@@ -19,11 +19,11 @@ "license": "Apache-2.0", | ||
"devDependencies": { | ||
"@types/mkdirp": "^0.5.2", | ||
"@types/uuid": "^7.0.0" | ||
"@types/mkdirp": "^1.0.0", | ||
"@types/uuid": "^8.3.0" | ||
}, | ||
"dependencies": { | ||
"mkdirp": "^0.5.1", | ||
"mkdirp": "^1.0.4", | ||
"properties": "^1.2.1", | ||
"uuid": "^7.0.2" | ||
"uuid": "^8.3.0" | ||
}, | ||
"gitHead": "79d3a6088a035d4310c1997aa897839ed5d9be4e" | ||
"gitHead": "96cb18546ac2ad3797beb1ce51d7f45ef5a0676c" | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
63634
+ Addedmkdirp@1.0.4(transitive)
+ Addeduuid@8.3.2(transitive)
- Removedminimist@1.2.8(transitive)
- Removedmkdirp@0.5.6(transitive)
- Removeduuid@7.0.3(transitive)
Updatedmkdirp@^1.0.4
Updateduuid@^8.3.0