jest-allure2-adapter
Advanced tools
Comparing version 0.1.3 to 0.1.4
@@ -222,3 +222,3 @@ "use strict"; | ||
this.environmentInfo[name] = value; | ||
this.writeEnvironmentInfo(this.environmentInfo); | ||
super.writeEnvironmentInfo(this.environmentInfo); | ||
return this; | ||
@@ -225,0 +225,0 @@ } |
@@ -11,4 +11,5 @@ /// <reference types="jest" /> | ||
constructor(globalConfig: jest.GlobalConfig, options?: Partial<JestAllureReporter.ReporterConfig>); | ||
onRunStart(results: jest.AggregatedResult, options: jest.ReporterOnStartOptions): void; | ||
onTestStart(test: jest.Test): void; | ||
} | ||
export = JestAllureReporter; |
@@ -12,2 +12,3 @@ "use strict"; | ||
} | ||
onRunStart(results, options) { } | ||
onTestStart(test) { | ||
@@ -14,0 +15,0 @@ const setupPath = require.resolve('./setup'); |
import { AllureReporter } from './AllureReporter'; | ||
export declare namespace jasmine { | ||
function getEnv(): any; | ||
interface CustomReporter { | ||
jasmineStarted?(suiteInfo: any): void; | ||
suiteStarted?(result: CustomReporterResult): void; | ||
specStarted?(result: CustomReporterResult): void; | ||
specDone?(result: CustomReporterResult): void; | ||
suiteDone?(result: CustomReporterResult): void; | ||
jasmineDone?(runDetails: any): void; | ||
} | ||
interface CustomReporterResult { | ||
description: string; | ||
failedExpectations?: any[]; | ||
fullName: string; | ||
id: string; | ||
passedExpectations?: any[]; | ||
pendingReason?: string; | ||
status?: string; | ||
} | ||
} | ||
export declare function registerAllureReporter(): void; | ||
@@ -23,0 +3,0 @@ declare global { |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.registerAllureReporter = void 0; | ||
const path_1 = require("path"); | ||
const AllureReporter_1 = require("./AllureReporter"); | ||
// export const Categories: Category[] = []; // todo check may not work | ||
class JasmineAllureReporter { | ||
constructor(allure) { | ||
this.allure = allure; | ||
} | ||
suiteStarted(suite) { | ||
if (suite) { | ||
this.allure.startGroup(suite.fullName); | ||
} | ||
else { | ||
// case for tests without suite | ||
this.allure.startGroup(path_1.relative(process.cwd(), expect.getState().testPath)); | ||
} | ||
} | ||
jasmineDone() { | ||
this.allure.writeCategories(); | ||
} | ||
suiteDone() { | ||
this.allure.endGroup(); | ||
} | ||
specStarted(spec) { | ||
this.allure.startTest(spec.description); | ||
} | ||
specDone(spec) { | ||
this.allure.endTest(spec); | ||
} | ||
} | ||
const JasmineAllureReporter_1 = require("./JasmineAllureReporter"); | ||
function registerAllureReporter() { | ||
const reporter = (global.reporter = new AllureReporter_1.AllureReporter()); | ||
jasmine.getEnv().addReporter(new JasmineAllureReporter(reporter)); | ||
jasmine.getEnv().addReporter(new JasmineAllureReporter_1.JasmineAllureReporter(reporter)); | ||
} | ||
exports.registerAllureReporter = registerAllureReporter; | ||
registerAllureReporter(); |
{ | ||
"name": "jest-allure2-adapter", | ||
"version": "0.1.3", | ||
"version": "0.1.4", | ||
"description": "Allure 2 Adapter for jest", | ||
@@ -5,0 +5,0 @@ "main": "dist/index", |
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
32375
11
856