@cucumber/cucumber
Advanced tools
Comparing version
/// <reference types="node" /> | ||
import { IConfiguration } from '../configuration'; | ||
import { ILogger } from '../logger'; | ||
import { ILogger } from '../environment'; | ||
import { IRunConfiguration } from './types'; | ||
export declare function convertConfiguration(logger: ILogger, flatConfiguration: IConfiguration, env: NodeJS.ProcessEnv): Promise<IRunConfiguration>; |
@@ -7,3 +7,3 @@ /// <reference types="node" /> | ||
import { SupportCodeLibrary } from '../support_code_library_builder/types'; | ||
import { ILogger } from '../logger'; | ||
import { ILogger } from '../environment'; | ||
import { PluginManager } from '../plugin'; | ||
@@ -10,0 +10,0 @@ import { IRunOptionsFormats } from './types'; |
@@ -37,3 +37,3 @@ "use strict"; | ||
else { | ||
await pluginManager.initFormatter(implementation, configuration.options, logger, stream.write.bind(stream), directory); | ||
await pluginManager.initFormatter(implementation, configuration.options, stream.write.bind(stream), directory); | ||
if (stream !== stdout) { | ||
@@ -40,0 +40,0 @@ cleanupFns.push((0, node_util_1.promisify)(stream.end.bind(stream))); |
@@ -10,2 +10,3 @@ /** | ||
export { IConfiguration } from '../configuration'; | ||
export { IRunEnvironment } from '../environment'; | ||
export { IPickleOrder } from '../filter'; | ||
@@ -12,0 +13,0 @@ export { IPublishConfig } from '../publish'; |
@@ -1,2 +0,3 @@ | ||
import { IRunEnvironment, IResolvedConfiguration, ILoadConfigurationOptions } from './types'; | ||
import { IRunEnvironment } from '../environment'; | ||
import { IResolvedConfiguration, ILoadConfigurationOptions } from './types'; | ||
/** | ||
@@ -3,0 +4,0 @@ * Load user-authored configuration to be used in a test run |
@@ -6,4 +6,4 @@ "use strict"; | ||
const configuration_1 = require("../configuration"); | ||
const environment_1 = require("../environment"); | ||
const convert_configuration_1 = require("./convert_configuration"); | ||
const environment_1 = require("./environment"); | ||
/** | ||
@@ -17,3 +17,3 @@ * Load user-authored configuration to be used in a test run | ||
async function loadConfiguration(options = {}, environment = {}) { | ||
const { cwd, env, logger } = (0, environment_1.mergeEnvironment)(environment); | ||
const { cwd, env, logger } = (0, environment_1.makeEnvironment)(environment); | ||
const configFile = options.file ?? (0, locate_file_1.locateFile)(cwd); | ||
@@ -20,0 +20,0 @@ if (configFile) { |
@@ -1,2 +0,3 @@ | ||
import { ILoadSourcesResult, IRunEnvironment, ISourcesCoordinates } from './types'; | ||
import { IRunEnvironment } from '../environment'; | ||
import { ILoadSourcesResult, ISourcesCoordinates } from './types'; | ||
/** | ||
@@ -3,0 +4,0 @@ * Load and parse features, produce a filtered and ordered test plan and/or |
@@ -6,3 +6,3 @@ "use strict"; | ||
const paths_1 = require("../paths"); | ||
const environment_1 = require("./environment"); | ||
const environment_1 = require("../environment"); | ||
const gherkin_1 = require("./gherkin"); | ||
@@ -19,6 +19,6 @@ const plugins_1 = require("./plugins"); | ||
async function loadSources(coordinates, environment = {}) { | ||
const mergedEnvironment = (0, environment_1.mergeEnvironment)(environment); | ||
const mergedEnvironment = (0, environment_1.makeEnvironment)(environment); | ||
const { cwd, logger } = mergedEnvironment; | ||
const newId = messages_1.IdGenerator.uuid(); | ||
const pluginManager = await (0, plugins_1.initializeForLoadSources)(logger, coordinates, mergedEnvironment); | ||
const pluginManager = await (0, plugins_1.initializeForLoadSources)(coordinates, mergedEnvironment); | ||
const resolvedPaths = await (0, paths_1.resolvePaths)(logger, cwd, coordinates); | ||
@@ -25,0 +25,0 @@ pluginManager.emit('paths:resolve', resolvedPaths); |
@@ -1,2 +0,3 @@ | ||
import { ILoadSupportOptions, IRunEnvironment, ISupportCodeLibrary } from './types'; | ||
import { IRunEnvironment } from '../environment'; | ||
import { ILoadSupportOptions, ISupportCodeLibrary } from './types'; | ||
/** | ||
@@ -3,0 +4,0 @@ * Load support code for use in test runs |
@@ -6,4 +6,4 @@ "use strict"; | ||
const paths_1 = require("../paths"); | ||
const environment_1 = require("../environment"); | ||
const support_1 = require("./support"); | ||
const environment_1 = require("./environment"); | ||
const plugins_1 = require("./plugins"); | ||
@@ -18,3 +18,3 @@ /** | ||
async function loadSupport(options, environment = {}) { | ||
const mergedEnvironment = (0, environment_1.mergeEnvironment)(environment); | ||
const mergedEnvironment = (0, environment_1.makeEnvironment)(environment); | ||
const { cwd, logger } = mergedEnvironment; | ||
@@ -28,3 +28,3 @@ const newId = messages_1.IdGenerator.uuid(); | ||
}, options.support); | ||
const pluginManager = await (0, plugins_1.initializeForLoadSupport)(); | ||
const pluginManager = await (0, plugins_1.initializeForLoadSupport)(mergedEnvironment); | ||
const resolvedPaths = await (0, paths_1.resolvePaths)(logger, cwd, options.sources, supportCoordinates); | ||
@@ -31,0 +31,0 @@ pluginManager.emit('paths:resolve', resolvedPaths); |
import { PluginManager } from '../plugin'; | ||
import { ILogger } from '../logger'; | ||
import { IRunConfiguration, IRunEnvironment, ISourcesCoordinates } from './types'; | ||
export declare function initializeForLoadSources(logger: ILogger, coordinates: ISourcesCoordinates, environment: Required<IRunEnvironment>): Promise<PluginManager>; | ||
export declare function initializeForLoadSupport(): Promise<PluginManager>; | ||
export declare function initializeForRunCucumber(logger: ILogger, configuration: IRunConfiguration, environment: Required<IRunEnvironment>): Promise<PluginManager>; | ||
import { UsableEnvironment } from '../environment'; | ||
import { IRunConfiguration, ISourcesCoordinates } from './types'; | ||
export declare function initializeForLoadSources(coordinates: ISourcesCoordinates, environment: UsableEnvironment): Promise<PluginManager>; | ||
export declare function initializeForLoadSupport(environment: UsableEnvironment): Promise<PluginManager>; | ||
export declare function initializeForRunCucumber(configuration: IRunConfiguration, environment: UsableEnvironment): Promise<PluginManager>; |
@@ -10,19 +10,19 @@ "use strict"; | ||
const filter_1 = __importDefault(require("../filter")); | ||
async function initializeForLoadSources(logger, coordinates, environment) { | ||
async function initializeForLoadSources(coordinates, environment) { | ||
// eventually we'll load plugin packages here | ||
const pluginManager = new plugin_1.PluginManager(); | ||
await pluginManager.initCoordinator('loadSources', filter_1.default, coordinates, logger, environment); | ||
const pluginManager = new plugin_1.PluginManager(environment); | ||
await pluginManager.initCoordinator('loadSources', filter_1.default, coordinates); | ||
return pluginManager; | ||
} | ||
exports.initializeForLoadSources = initializeForLoadSources; | ||
async function initializeForLoadSupport() { | ||
async function initializeForLoadSupport(environment) { | ||
// eventually we'll load plugin packages here | ||
return new plugin_1.PluginManager(); | ||
return new plugin_1.PluginManager(environment); | ||
} | ||
exports.initializeForLoadSupport = initializeForLoadSupport; | ||
async function initializeForRunCucumber(logger, configuration, environment) { | ||
async function initializeForRunCucumber(configuration, environment) { | ||
// eventually we'll load plugin packages here | ||
const pluginManager = new plugin_1.PluginManager(); | ||
await pluginManager.initCoordinator('runCucumber', publish_1.default, configuration.formats.publish, logger, environment); | ||
await pluginManager.initCoordinator('runCucumber', filter_1.default, configuration.sources, logger, environment); | ||
const pluginManager = new plugin_1.PluginManager(environment); | ||
await pluginManager.initCoordinator('runCucumber', publish_1.default, configuration.formats.publish); | ||
await pluginManager.initCoordinator('runCucumber', filter_1.default, configuration.sources); | ||
return pluginManager; | ||
@@ -29,0 +29,0 @@ } |
import { Envelope } from '@cucumber/messages'; | ||
import { IRunOptions, IRunEnvironment, IRunResult } from './types'; | ||
import { IRunEnvironment } from '../environment'; | ||
import { IRunOptions, IRunResult } from './types'; | ||
/** | ||
@@ -4,0 +5,0 @@ * Execute a Cucumber test run and return the overall result |
@@ -11,5 +11,5 @@ "use strict"; | ||
const runtime_1 = require("../runtime"); | ||
const environment_1 = require("../environment"); | ||
const formatters_1 = require("./formatters"); | ||
const support_1 = require("./support"); | ||
const environment_1 = require("./environment"); | ||
const gherkin_1 = require("./gherkin"); | ||
@@ -26,3 +26,3 @@ const plugins_1 = require("./plugins"); | ||
async function runCucumber(options, environment = {}, onMessage) { | ||
const mergedEnvironment = (0, environment_1.mergeEnvironment)(environment); | ||
const mergedEnvironment = (0, environment_1.makeEnvironment)(environment); | ||
const { cwd, stdout, stderr, env, logger } = mergedEnvironment; | ||
@@ -42,3 +42,3 @@ logger.debug(`Running cucumber-js ${version_1.version} | ||
}, options.support); | ||
const pluginManager = await (0, plugins_1.initializeForRunCucumber)(logger, { | ||
const pluginManager = await (0, plugins_1.initializeForRunCucumber)({ | ||
...options, | ||
@@ -45,0 +45,0 @@ support: supportCoordinates, |
import { IdGenerator } from '@cucumber/messages'; | ||
import { SupportCodeLibrary } from '../support_code_library_builder/types'; | ||
import { ILogger } from '../logger'; | ||
import { ILogger } from '../environment'; | ||
export declare function getSupportCodeLibrary({ logger, cwd, newId, requireModules, requirePaths, importPaths, loaders, }: { | ||
@@ -5,0 +5,0 @@ logger: ILogger; |
@@ -1,3 +0,3 @@ | ||
import { IRunEnvironment } from './types'; | ||
import { IRunEnvironment } from '../environment'; | ||
export declare function setupEnvironment(): Promise<Partial<IRunEnvironment>>; | ||
export declare function teardownEnvironment(environment: IRunEnvironment): Promise<void>; |
@@ -1,4 +0,1 @@ | ||
/// <reference types="node" /> | ||
/// <reference types="node" /> | ||
import { Writable } from 'node:stream'; | ||
import { JsonObject } from 'type-fest'; | ||
@@ -284,34 +281,2 @@ import { IPublishConfig } from '../publish'; | ||
/** | ||
* Contextual data about the project environment | ||
* @public | ||
*/ | ||
export interface IRunEnvironment { | ||
/** | ||
* Working directory for the project | ||
* @default process.cwd() | ||
*/ | ||
cwd?: string; | ||
/** | ||
* Writable stream where the test run's main formatter output is written | ||
* @default process.stdout | ||
*/ | ||
stdout?: Writable; | ||
/** | ||
* Writable stream where the test run's warning/error output is written | ||
* @default process.stderr | ||
*/ | ||
stderr?: Writable; | ||
/** | ||
* Environment variables | ||
* @default process.env | ||
*/ | ||
env?: NodeJS.ProcessEnv; | ||
/** | ||
* Whether debug logging should be emitted to {@link IRunEnvironment.stderr} | ||
* @default false | ||
* @see {@link https://github.com/cucumber/cucumber-js/blob/main/docs/debugging.md} | ||
*/ | ||
debug?: boolean; | ||
} | ||
/** | ||
* Response from {@link runCucumber} | ||
@@ -318,0 +283,0 @@ * @public |
@@ -6,7 +6,2 @@ /// <reference types="node" /> | ||
import { AssembledTestCase, SourcedPickle } from './types'; | ||
export declare function assembleTestCases({ eventBroadcaster, newId, sourcedPickles, supportCodeLibrary, }: { | ||
eventBroadcaster: EventEmitter; | ||
newId: IdGenerator.NewId; | ||
sourcedPickles: ReadonlyArray<SourcedPickle>; | ||
supportCodeLibrary: SupportCodeLibrary; | ||
}): Promise<ReadonlyArray<AssembledTestCase>>; | ||
export declare function assembleTestCases(testRunStartedId: string, eventBroadcaster: EventEmitter, newId: IdGenerator.NewId, sourcedPickles: ReadonlyArray<SourcedPickle>, supportCodeLibrary: SupportCodeLibrary): Promise<ReadonlyArray<AssembledTestCase>>; |
@@ -5,3 +5,3 @@ "use strict"; | ||
const value_checker_1 = require("../value_checker"); | ||
async function assembleTestCases({ eventBroadcaster, newId, sourcedPickles, supportCodeLibrary, }) { | ||
async function assembleTestCases(testRunStartedId, eventBroadcaster, newId, sourcedPickles, supportCodeLibrary) { | ||
return sourcedPickles.map(({ gherkinDocument, pickle }) => { | ||
@@ -25,2 +25,3 @@ const testCaseId = newId(); | ||
const testCase = { | ||
testRunStartedId, | ||
pickleId: pickle.id, | ||
@@ -27,0 +28,0 @@ id: testCaseId, |
@@ -6,3 +6,3 @@ /// <reference types="node" /> | ||
import { SupportCodeLibrary } from '../support_code_library_builder/types'; | ||
import { ILogger } from '../logger'; | ||
import { ILogger } from '../environment'; | ||
import { IPickleOrder } from '../filter'; | ||
@@ -9,0 +9,0 @@ export declare function orderPickles<T = string>(pickleIds: T[], order: IPickleOrder, logger: ILogger): void; |
@@ -33,2 +33,3 @@ "use strict"; | ||
const messages = __importStar(require("@cucumber/messages")); | ||
const messages_1 = require("@cucumber/messages"); | ||
const ci_environment_1 = __importDefault(require("@cucumber/ci-environment")); | ||
@@ -141,14 +142,23 @@ const version_1 = require("../version"); | ||
; | ||
[] | ||
.concat(supportCodeLibrary.beforeTestCaseHookDefinitions, supportCodeLibrary.afterTestCaseHookDefinitions) | ||
.forEach((testCaseHookDefinition) => { | ||
const envelope = { | ||
hook: { | ||
id: testCaseHookDefinition.id, | ||
name: testCaseHookDefinition.name, | ||
tagExpression: testCaseHookDefinition.tagExpression, | ||
sourceReference: makeSourceReference(testCaseHookDefinition), | ||
}, | ||
}; | ||
eventBroadcaster.emit('envelope', envelope); | ||
[ | ||
[ | ||
supportCodeLibrary.beforeTestCaseHookDefinitions, | ||
messages_1.HookType.BEFORE_TEST_CASE, | ||
], | ||
[ | ||
supportCodeLibrary.afterTestCaseHookDefinitions, | ||
messages_1.HookType.AFTER_TEST_CASE, | ||
], | ||
].forEach(([hooks, type]) => { | ||
hooks.forEach((hook) => { | ||
eventBroadcaster.emit('envelope', { | ||
hook: { | ||
id: hook.id, | ||
type, | ||
name: hook.name, | ||
tagExpression: hook.tagExpression, | ||
sourceReference: makeSourceReference(hook), | ||
}, | ||
}); | ||
}); | ||
}); | ||
@@ -158,12 +168,21 @@ } | ||
; | ||
[] | ||
.concat(supportCodeLibrary.beforeTestRunHookDefinitions, supportCodeLibrary.afterTestRunHookDefinitions) | ||
.forEach((testRunHookDefinition) => { | ||
const envelope = { | ||
hook: { | ||
id: testRunHookDefinition.id, | ||
sourceReference: makeSourceReference(testRunHookDefinition), | ||
}, | ||
}; | ||
eventBroadcaster.emit('envelope', envelope); | ||
[ | ||
[ | ||
supportCodeLibrary.beforeTestRunHookDefinitions, | ||
messages_1.HookType.BEFORE_TEST_RUN, | ||
], | ||
[ | ||
supportCodeLibrary.afterTestRunHookDefinitions, | ||
messages_1.HookType.AFTER_TEST_RUN, | ||
], | ||
].forEach(([hooks, type]) => { | ||
hooks.forEach((hook) => { | ||
eventBroadcaster.emit('envelope', { | ||
hook: { | ||
id: hook.id, | ||
type, | ||
sourceReference: makeSourceReference(hook), | ||
}, | ||
}); | ||
}); | ||
}); | ||
@@ -170,0 +189,0 @@ } |
@@ -1,3 +0,3 @@ | ||
import { ILogger } from '../logger'; | ||
import { ILogger } from '../environment'; | ||
import { IConfiguration } from './types'; | ||
export declare function fromFile(logger: ILogger, cwd: string, file: string, profiles?: string[]): Promise<Partial<IConfiguration>>; |
@@ -12,3 +12,2 @@ "use strict"; | ||
const yaml_1 = __importDefault(require("yaml")); | ||
const read_pkg_up_1 = __importDefault(require("read-pkg-up")); | ||
const merge_configurations_1 = require("./merge_configurations"); | ||
@@ -101,5 +100,6 @@ const parse_configuration_1 = require("./parse_configuration"); | ||
async function readPackageJson(filePath) { | ||
const parentPackage = await (0, read_pkg_up_1.default)({ cwd: node_path_1.default.dirname(filePath) }); | ||
const { readPackageUp } = await import('read-package-up'); | ||
const parentPackage = await readPackageUp({ cwd: node_path_1.default.dirname(filePath) }); | ||
return parentPackage?.packageJson; | ||
} | ||
//# sourceMappingURL=from_file.js.map |
@@ -1,3 +0,3 @@ | ||
import { ILogger } from '../logger'; | ||
import { ILogger } from '../environment'; | ||
import { IConfiguration } from './types'; | ||
export declare function parseConfiguration(logger: ILogger, source: string, definition: Partial<IConfiguration> | string[] | string | undefined): Partial<IConfiguration>; |
@@ -1,2 +0,2 @@ | ||
import { ILogger } from '../logger'; | ||
import { ILogger } from '../environment'; | ||
export declare function splitFormatDescriptor(logger: ILogger, option: string): string[]; |
@@ -1,3 +0,3 @@ | ||
import { ILogger } from '../logger'; | ||
import { ILogger } from '../environment'; | ||
import { IConfiguration } from './types'; | ||
export declare function validateConfiguration(configuration: IConfiguration, logger: ILogger): void; |
/// <reference types="node" /> | ||
import { Writable } from 'node:stream'; | ||
import { ILogger } from '../logger'; | ||
import { ILogger } from '../environment'; | ||
export declare function createStream(target: string, onStreamError: () => void, cwd: string, logger: ILogger): Promise<{ | ||
@@ -5,0 +5,0 @@ directory: string; |
@@ -1,4 +0,4 @@ | ||
import { ILogger } from '../logger'; | ||
import { ILogger } from '../environment'; | ||
import { ISourcesCoordinates, ISupportCodeCoordinates } from '../api'; | ||
import { IResolvedPaths } from './types'; | ||
export declare function resolvePaths(logger: ILogger, cwd: string, sources: Pick<ISourcesCoordinates, 'paths'>, support?: ISupportCodeCoordinates): Promise<IResolvedPaths>; |
@@ -1,10 +0,11 @@ | ||
import { IRunEnvironment } from '../api'; | ||
import { ILogger } from '../logger'; | ||
import { UsableEnvironment } from '../environment'; | ||
import { InternalPlugin, CoordinatorPluginEventValues, CoordinatorPluginEventKey, CoordinatorPluginTransformEventKey, Operation, FormatterPlugin } from './types'; | ||
export declare class PluginManager { | ||
private readonly environment; | ||
private handlers; | ||
private cleanupFns; | ||
constructor(environment: UsableEnvironment); | ||
private register; | ||
initFormatter<OptionsType>(plugin: FormatterPlugin<OptionsType>, options: OptionsType, logger: ILogger, write: (buffer: string | Uint8Array) => void, directory?: string): Promise<void>; | ||
initCoordinator<OptionsType>(operation: Operation, plugin: InternalPlugin<OptionsType>, options: OptionsType, logger: ILogger, environment: Required<IRunEnvironment>): Promise<void>; | ||
initFormatter<OptionsType>(plugin: FormatterPlugin<OptionsType>, options: OptionsType, write: (buffer: string | Uint8Array) => void, directory?: string): Promise<void>; | ||
initCoordinator<OptionsType>(operation: Operation, plugin: InternalPlugin<OptionsType>, options: OptionsType): Promise<void>; | ||
emit<K extends CoordinatorPluginEventKey>(event: K, value: CoordinatorPluginEventValues[K]): void; | ||
@@ -11,0 +12,0 @@ transform<K extends CoordinatorPluginTransformEventKey>(event: K, value: CoordinatorPluginEventValues[K]): Promise<CoordinatorPluginEventValues[K]>; |
@@ -5,2 +5,3 @@ "use strict"; | ||
class PluginManager { | ||
environment; | ||
handlers = { | ||
@@ -13,6 +14,9 @@ message: [], | ||
cleanupFns = []; | ||
constructor(environment) { | ||
this.environment = environment; | ||
} | ||
async register(event, handler) { | ||
this.handlers[event]?.push(handler); | ||
} | ||
async initFormatter(plugin, options, logger, write, directory) { | ||
async initFormatter(plugin, options, write, directory) { | ||
const cleanupFn = await plugin.formatter({ | ||
@@ -23,3 +27,3 @@ on: (key, handler) => this.register(key, handler), | ||
: options, | ||
logger, | ||
logger: this.environment.logger, | ||
write, | ||
@@ -32,3 +36,3 @@ directory, | ||
} | ||
async initCoordinator(operation, plugin, options, logger, environment) { | ||
async initCoordinator(operation, plugin, options) { | ||
const cleanupFn = await plugin.coordinator({ | ||
@@ -38,4 +42,8 @@ operation, | ||
options, | ||
logger, | ||
environment, | ||
logger: this.environment.logger, | ||
environment: { | ||
cwd: this.environment.cwd, | ||
stderr: this.environment.stderr, | ||
env: { ...this.environment.env }, | ||
}, | ||
}); | ||
@@ -42,0 +50,0 @@ if (typeof cleanupFn === 'function') { |
import { Envelope } from '@cucumber/messages'; | ||
import { ArrayValues, Promisable } from 'type-fest'; | ||
import { IRunEnvironment } from '../api'; | ||
import { ILogger } from '../logger'; | ||
import { IRunEnvironment } from '../environment'; | ||
import { ILogger } from '../environment'; | ||
import { IFilterablePickle } from '../filter'; | ||
@@ -9,2 +9,3 @@ import { IResolvedPaths } from '../paths'; | ||
export type Operation = 'loadSources' | 'loadSupport' | 'runCucumber'; | ||
export type CoordinatorPluginEnvironment = Required<Pick<IRunEnvironment, 'cwd' | 'stderr' | 'env'>>; | ||
export type CoordinatorPluginVoidEventKey = ArrayValues<typeof coordinatorVoidKeys>; | ||
@@ -25,3 +26,3 @@ export type CoordinatorPluginTransformEventKey = ArrayValues<typeof coordinatorTransformKeys>; | ||
logger: ILogger; | ||
environment: Required<IRunEnvironment>; | ||
environment: CoordinatorPluginEnvironment; | ||
} | ||
@@ -28,0 +29,0 @@ export type CoordinatorPluginFunction<OptionsType> = (context: CoordinatorPluginContext<OptionsType>) => Promisable<PluginCleanup | void>; |
@@ -20,16 +20,14 @@ "use strict"; | ||
async run() { | ||
const testRunStartedId = this.newId(); | ||
this.eventBroadcaster.emit('envelope', { | ||
testRunStarted: { | ||
id: testRunStartedId, | ||
timestamp: (0, stopwatch_1.timestamp)(), | ||
}, | ||
}); | ||
const assembledTestCases = await (0, assemble_1.assembleTestCases)({ | ||
eventBroadcaster: this.eventBroadcaster, | ||
newId: this.newId, | ||
sourcedPickles: this.sourcedPickles, | ||
supportCodeLibrary: this.supportCodeLibrary, | ||
}); | ||
const assembledTestCases = await (0, assemble_1.assembleTestCases)(testRunStartedId, this.eventBroadcaster, this.newId, this.sourcedPickles, this.supportCodeLibrary); | ||
const success = await this.adapter.run(assembledTestCases); | ||
this.eventBroadcaster.emit('envelope', { | ||
testRunFinished: { | ||
testRunStartedId, | ||
timestamp: (0, stopwatch_1.timestamp)(), | ||
@@ -36,0 +34,0 @@ success, |
/// <reference types="node" /> | ||
import { EventEmitter } from 'node:events'; | ||
import { IdGenerator } from '@cucumber/messages'; | ||
import { IRunEnvironment, IRunOptionsRuntime } from '../api'; | ||
import { ILogger } from '../logger'; | ||
import { IRunOptionsRuntime } from '../api'; | ||
import { ILogger } from '../environment'; | ||
import { SourcedPickle } from '../assemble'; | ||
import { SupportCodeLibrary } from '../support_code_library_builder/types'; | ||
import { IRunEnvironment } from '../environment'; | ||
import { Runtime } from './types'; | ||
@@ -9,0 +10,0 @@ export declare function makeRuntime({ environment, logger, eventBroadcaster, sourcedPickles, newId, supportCodeLibrary, options, }: { |
@@ -7,5 +7,5 @@ /// <reference types="node" /> | ||
import { AssembledTestCase } from '../../assemble'; | ||
import { ILogger } from '../../logger'; | ||
import { ILogger, IRunEnvironment } from '../../environment'; | ||
import { RuntimeAdapter } from '../types'; | ||
import { IRunEnvironment, IRunOptionsRuntime } from '../../api'; | ||
import { IRunOptionsRuntime } from '../../api'; | ||
import { WorkerToCoordinatorEvent } from './types'; | ||
@@ -12,0 +12,0 @@ declare const enum WorkerState { |
@@ -40,6 +40,8 @@ "use strict"; | ||
try { | ||
invocationData = await stepDefinition.getInvocationParameters({ | ||
hookParameter, | ||
step, | ||
world, | ||
await (0, scope_1.runInTestCaseScope)({ world }, async () => { | ||
invocationData = await stepDefinition.getInvocationParameters({ | ||
hookParameter, | ||
step, | ||
world, | ||
}); | ||
}); | ||
@@ -46,0 +48,0 @@ } |
@@ -1,1 +0,1 @@ | ||
export declare const version = "11.1.1"; | ||
export declare const version = "11.2.0"; |
@@ -5,3 +5,3 @@ "use strict"; | ||
// Generated by genversion. | ||
exports.version = '11.1.1'; | ||
exports.version = '11.2.0'; | ||
//# sourceMappingURL=version.js.map |
@@ -11,3 +11,3 @@ { | ||
], | ||
"version": "11.1.1", | ||
"version": "11.2.0", | ||
"funding": "https://opencollective.com/cucumber", | ||
@@ -221,10 +221,10 @@ "homepage": "https://github.com/cucumber/cucumber-js", | ||
"@cucumber/ci-environment": "10.0.1", | ||
"@cucumber/cucumber-expressions": "17.1.0", | ||
"@cucumber/gherkin": "28.0.0", | ||
"@cucumber/cucumber-expressions": "18.0.1", | ||
"@cucumber/gherkin": "30.0.4", | ||
"@cucumber/gherkin-streams": "5.0.1", | ||
"@cucumber/gherkin-utils": "9.0.0", | ||
"@cucumber/html-formatter": "21.6.0", | ||
"@cucumber/junit-xml-formatter": "0.6.0", | ||
"@cucumber/html-formatter": "21.7.0", | ||
"@cucumber/junit-xml-formatter": "0.7.1", | ||
"@cucumber/message-streams": "4.0.1", | ||
"@cucumber/messages": "24.1.0", | ||
"@cucumber/messages": "27.0.2", | ||
"@cucumber/tag-expressions": "6.1.1", | ||
@@ -252,3 +252,3 @@ "assertion-error-formatter": "^3.0.0", | ||
"progress": "^2.0.3", | ||
"read-pkg-up": "^7.0.1", | ||
"read-package-up": "^11.0.0", | ||
"resolve-pkg": "^2.0.0", | ||
@@ -265,4 +265,4 @@ "semver": "7.5.3", | ||
"devDependencies": { | ||
"@cucumber/compatibility-kit": "15.0.0", | ||
"@cucumber/query": "12.1.2", | ||
"@cucumber/compatibility-kit": "17.0.0", | ||
"@cucumber/query": "13.0.3", | ||
"@microsoft/api-extractor": "7.39.0", | ||
@@ -269,0 +269,0 @@ "@sinonjs/fake-timers": "10.0.2", |
<h1 align="center"> | ||
<img src="./docs/images/logo.svg" alt=""> | ||
<img src="./docs/images/logo.svg" alt="" width="75"> | ||
<br> | ||
@@ -10,8 +10,10 @@ Cucumber | ||
[](https://vshymanskyy.github.io/StandWithUkraine) | ||
[](https://www.npmjs.com/package/@cucumber/cucumber) | ||
[](https://github.com/cucumber/cucumber-js/actions) | ||
[](https://coveralls.io/github/cucumber/cucumber-js?branch=master) | ||
[](https://opencollective.com/cucumber) | ||
[](https://opencollective.com/cucumber) | ||
<p align="center"> | ||
<a href="https://www.npmjs.com/package/@cucumber/cucumber" style="text-decoration: none"><img src="https://img.shields.io/npm/v/@cucumber/cucumber?style=flat&color=dark-green" alt="Latest version on npm"></a> | ||
<a href="https://github.com/cucumber/cucumber-js/actions" style="text-decoration: none"><img src="https://github.com/cucumber/cucumber-js/actions/workflows/build.yaml/badge.svg" alt="Build status"></a> | ||
<a href="https://coveralls.io/github/cucumber/cucumber-js?branch=master" style="text-decoration: none"><img src="https://coveralls.io/repos/github/cucumber/cucumber-js/badge.svg?branch=main" alt="Coverage"></a> | ||
<a href="https://opencollective.com/cucumber"><img src="https://opencollective.com/cucumber/backers/badge.svg" alt="Backers"></a> | ||
<a href="https://opencollective.com/cucumber"><img src="https://opencollective.com/cucumber/sponsors/badge.svg" alt="Sponsors"></a> | ||
<a href="https://vshymanskyy.github.io/StandWithUkraine"><img src="https://raw.githubusercontent.com/vshymanskyy/StandWithUkraine/main/badges/StandWithUkraine.svg" alt="Ukraine solidarity"></a> | ||
</p> | ||
@@ -18,0 +20,0 @@ [Cucumber](https://github.com/cucumber) is a tool for running automated tests written in plain language. Because they're |
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
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
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
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
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
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
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
868351
0.46%410
0.74%8943
0.54%127
1.6%+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
Updated
Updated