Socket
Socket
Sign inDemoInstall

@cucumber/cucumber

Package Overview
Dependencies
Maintainers
2
Versions
60
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@cucumber/cucumber - npm Package Compare versions

Comparing version 10.9.0 to 11.0.0

lib/assemble/assemble_test_cases.d.ts

18

lib/api/run_cucumber.js

@@ -10,3 +10,3 @@ "use strict";

const version_1 = require("../version");
const runtime_1 = require("./runtime");
const runtime_1 = require("../runtime");
const formatters_1 = require("./formatters");

@@ -80,3 +80,3 @@ const support_1 = require("./support");

await (0, helpers_2.emitMetaMessage)(eventBroadcaster, env);
let pickleIds = [];
let filteredPickles = [];
let parseErrors = [];

@@ -91,5 +91,4 @@ if (sourcePaths.length > 0) {

});
const filteredPickles = await pluginManager.transform('pickles:filter', gherkinResult.filterablePickles);
const orderedPickles = await pluginManager.transform('pickles:order', filteredPickles);
pickleIds = orderedPickles.map(({ pickle }) => pickle.id);
filteredPickles = await pluginManager.transform('pickles:filter', gherkinResult.filterablePickles);
filteredPickles = await pluginManager.transform('pickles:order', filteredPickles);
parseErrors = gherkinResult.parseErrors;

@@ -113,8 +112,7 @@ }

});
const runtime = (0, runtime_1.makeRuntime)({
cwd,
const runtime = await (0, runtime_1.makeRuntime)({
environment,
logger,
eventBroadcaster,
eventDataCollector,
pickleIds,
sourcedPickles: filteredPickles,
newId,

@@ -124,3 +122,3 @@ supportCodeLibrary,

});
const success = await runtime.start();
const success = await runtime.run();
await pluginManager.cleanup();

@@ -127,0 +125,0 @@ await cleanupFormatters();

/// <reference types="node" />
/// <reference types="node" />
/// <reference types="node" />
import { EventEmitter } from 'node:events';
import { Readable } from 'node:stream';
import { IdGenerator } from '@cucumber/messages';
import { EventDataCollector } from '../formatter/helpers';
import PickleFilter from '../pickle_filter';
import { SupportCodeLibrary } from '../support_code_library_builder/types';
import { ILogger } from '../logger';
import { IPickleOrder } from '../filter';
interface IParseGherkinMessageStreamRequest {
cwd?: string;
eventBroadcaster: EventEmitter;
eventDataCollector: EventDataCollector;
gherkinMessageStream: Readable;
order: string;
pickleFilter: PickleFilter;
}
/**
* Process a stream of envelopes from Gherkin and resolve to an array of filtered, ordered pickle Ids
*
* @param eventBroadcaster
* @param eventDataCollector
* @param gherkinMessageStream
* @param order
* @param pickleFilter
*/
export declare function parseGherkinMessageStream({ eventBroadcaster, eventDataCollector, gherkinMessageStream, order, pickleFilter, }: IParseGherkinMessageStreamRequest): Promise<string[]>;
export declare function orderPickles<T = string>(pickleIds: T[], order: IPickleOrder, logger: ILogger): void;

@@ -37,2 +15,1 @@ export declare function emitMetaMessage(eventBroadcaster: EventEmitter, env: NodeJS.ProcessEnv): Promise<void>;

}): void;
export {};

@@ -29,3 +29,3 @@ "use strict";

Object.defineProperty(exports, "__esModule", { value: true });
exports.emitSupportCodeMessages = exports.emitMetaMessage = exports.orderPickles = exports.parseGherkinMessageStream = void 0;
exports.emitSupportCodeMessages = exports.emitMetaMessage = exports.orderPickles = void 0;
const node_os_1 = __importDefault(require("node:os"));

@@ -35,35 +35,3 @@ const knuth_shuffle_seeded_1 = __importDefault(require("knuth-shuffle-seeded"));

const ci_environment_1 = __importDefault(require("@cucumber/ci-environment"));
const value_checker_1 = require("../value_checker");
const version_1 = require("../version");
/**
* Process a stream of envelopes from Gherkin and resolve to an array of filtered, ordered pickle Ids
*
* @param eventBroadcaster
* @param eventDataCollector
* @param gherkinMessageStream
* @param order
* @param pickleFilter
*/
async function parseGherkinMessageStream({ eventBroadcaster, eventDataCollector, gherkinMessageStream, order, pickleFilter, }) {
return await new Promise((resolve, reject) => {
const result = [];
gherkinMessageStream.on('data', (envelope) => {
eventBroadcaster.emit('envelope', envelope);
if ((0, value_checker_1.doesHaveValue)(envelope.pickle)) {
const pickle = envelope.pickle;
const pickleId = pickle.id;
const gherkinDocument = eventDataCollector.getGherkinDocument(pickle.uri);
if (pickleFilter.matches({ gherkinDocument, pickle })) {
result.push(pickleId);
}
}
});
gherkinMessageStream.on('end', () => {
orderPickles(result, order, console);
resolve(result);
});
gherkinMessageStream.on('error', reject);
});
}
exports.parseGherkinMessageStream = parseGherkinMessageStream;
// Orders the pickleIds in place - morphs input

@@ -70,0 +38,0 @@ function orderPickles(pickleIds, order, logger) {

@@ -11,7 +11,4 @@ /**

import { default as _Cli } from './cli';
import * as cliHelpers from './cli/helpers';
import * as formatterHelpers from './formatter/helpers';
import { default as _PickleFilter } from './pickle_filter';
import * as parallelCanAssignHelpers from './support_code_library_builder/parallel_can_assign_helpers';
import { default as _Runtime } from './runtime';
export declare const version: string;

@@ -57,14 +54,1 @@ export { default as supportCodeLibraryBuilder } from './support_code_library_builder';

export declare const Cli: typeof _Cli;
/**
* @deprecated use `loadSources` instead; see https://github.com/cucumber/cucumber-js/blob/main/docs/deprecations.md
*/
export declare const parseGherkinMessageStream: typeof cliHelpers.parseGherkinMessageStream;
/**
* @deprecated use `loadSources` instead; see https://github.com/cucumber/cucumber-js/blob/main/docs/deprecations.md
*/
export declare const PickleFilter: typeof _PickleFilter;
/**
* @deprecated use `runCucumber` instead; see https://github.com/cucumber/cucumber-js/blob/main/docs/deprecations.md
*/
export declare const Runtime: typeof _Runtime;
export { INewRuntimeOptions, IRuntimeOptions } from './runtime';

@@ -37,13 +37,10 @@ "use strict";

Object.defineProperty(exports, "__esModule", { value: true });
exports.Runtime = exports.PickleFilter = exports.parseGherkinMessageStream = exports.Cli = exports.wrapPromiseWithTimeout = exports.Status = exports.parallelCanAssignHelpers = exports.context = exports.world = exports.World = exports.When = exports.Then = exports.setParallelCanAssign = exports.setWorldConstructor = exports.setDefinitionFunctionWrapper = exports.setDefaultTimeout = exports.Given = exports.defineParameterType = exports.defineStep = exports.BeforeStep = exports.BeforeAll = exports.Before = exports.AfterStep = exports.AfterAll = exports.After = exports.formatterHelpers = exports.UsageJsonFormatter = exports.UsageFormatter = exports.SummaryFormatter = exports.SnippetsFormatter = exports.RerunFormatter = exports.ProgressFormatter = exports.JsonFormatter = exports.FormatterBuilder = exports.Formatter = exports.TestCaseHookDefinition = exports.DataTable = exports.supportCodeLibraryBuilder = exports.version = void 0;
exports.Cli = exports.wrapPromiseWithTimeout = exports.Status = exports.parallelCanAssignHelpers = exports.context = exports.world = exports.World = exports.When = exports.Then = exports.setParallelCanAssign = exports.setWorldConstructor = exports.setDefinitionFunctionWrapper = exports.setDefaultTimeout = exports.Given = exports.defineParameterType = exports.defineStep = exports.BeforeStep = exports.BeforeAll = exports.Before = exports.AfterStep = exports.AfterAll = exports.After = exports.formatterHelpers = exports.UsageJsonFormatter = exports.UsageFormatter = exports.SummaryFormatter = exports.SnippetsFormatter = exports.RerunFormatter = exports.ProgressFormatter = exports.JsonFormatter = exports.FormatterBuilder = exports.Formatter = exports.TestCaseHookDefinition = exports.DataTable = exports.supportCodeLibraryBuilder = exports.version = void 0;
const node_util_1 = require("node:util");
const messages = __importStar(require("@cucumber/messages"));
const cli_1 = __importDefault(require("./cli"));
const cliHelpers = __importStar(require("./cli/helpers"));
const formatterHelpers = __importStar(require("./formatter/helpers"));
exports.formatterHelpers = formatterHelpers;
const pickle_filter_1 = __importDefault(require("./pickle_filter"));
const parallelCanAssignHelpers = __importStar(require("./support_code_library_builder/parallel_can_assign_helpers"));
exports.parallelCanAssignHelpers = parallelCanAssignHelpers;
const runtime_1 = __importDefault(require("./runtime"));
const support_code_library_builder_1 = __importDefault(require("./support_code_library_builder"));

@@ -110,14 +107,2 @@ const version_1 = require("./version");

exports.Cli = (0, node_util_1.deprecate)(cli_1.default, '`Cli` is deprecated, use `runCucumber` instead; see https://github.com/cucumber/cucumber-js/blob/main/docs/deprecations.md');
/**
* @deprecated use `loadSources` instead; see https://github.com/cucumber/cucumber-js/blob/main/docs/deprecations.md
*/
exports.parseGherkinMessageStream = (0, node_util_1.deprecate)(cliHelpers.parseGherkinMessageStream, '`parseGherkinMessageStream` is deprecated, use `loadSources` instead; see https://github.com/cucumber/cucumber-js/blob/main/docs/deprecations.md');
/**
* @deprecated use `loadSources` instead; see https://github.com/cucumber/cucumber-js/blob/main/docs/deprecations.md
*/
exports.PickleFilter = (0, node_util_1.deprecate)(pickle_filter_1.default, '`PickleFilter` is deprecated, use `loadSources` instead; see https://github.com/cucumber/cucumber-js/blob/main/docs/deprecations.md');
/**
* @deprecated use `runCucumber` instead; see https://github.com/cucumber/cucumber-js/blob/main/docs/deprecations.md
*/
exports.Runtime = (0, node_util_1.deprecate)(runtime_1.default, '`Runtime` is deprecated, use `runCucumber` instead; see https://github.com/cucumber/cucumber-js/blob/main/docs/deprecations.md');
//# sourceMappingURL=index.js.map
import * as messages from '@cucumber/messages';
import StepDefinition from '../models/step_definition';
import { IRuntimeOptions } from '.';
import { RuntimeOptions } from '.';
export declare function getAmbiguousStepException(stepDefinitions: StepDefinition[]): string;
export declare function retriesForPickle(pickle: messages.Pickle, options: IRuntimeOptions): number;
export declare function shouldCauseFailure(status: messages.TestStepResultStatus, options: IRuntimeOptions): boolean;
export declare function retriesForPickle(pickle: messages.Pickle, options: RuntimeOptions): number;
export declare function shouldCauseFailure(status: messages.TestStepResultStatus, options: RuntimeOptions): boolean;

@@ -1,41 +0,2 @@

/// <reference types="node" />
import { EventEmitter } from 'node:events';
import * as messages from '@cucumber/messages';
import { IdGenerator } from '@cucumber/messages';
import { JsonObject } from 'type-fest';
import { EventDataCollector } from '../formatter/helpers';
import { SupportCodeLibrary } from '../support_code_library_builder/types';
export interface IRuntime {
start: () => Promise<boolean>;
}
export interface INewRuntimeOptions {
eventBroadcaster: EventEmitter;
eventDataCollector: EventDataCollector;
newId: IdGenerator.NewId;
options: IRuntimeOptions;
pickleIds: string[];
supportCodeLibrary: SupportCodeLibrary;
}
export interface IRuntimeOptions {
dryRun: boolean;
failFast: boolean;
filterStacktraces: boolean;
retry: number;
retryTagFilter: string;
strict: boolean;
worldParameters: JsonObject;
}
export default class Runtime implements IRuntime {
private readonly eventBroadcaster;
private readonly eventDataCollector;
private readonly stopwatch;
private readonly newId;
private readonly options;
private readonly pickleIds;
private readonly supportCodeLibrary;
private success;
private readonly runTestRunHooks;
constructor({ eventBroadcaster, eventDataCollector, newId, options, pickleIds, supportCodeLibrary, }: INewRuntimeOptions);
runTestCase(pickleId: string, testCase: messages.TestCase): Promise<void>;
start(): Promise<boolean>;
}
export * from './make_runtime';
export { Runtime, RuntimeOptions } from './types';
"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __exportStar = (this && this.__exportStar) || function(m, exports) {
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
};
Object.defineProperty(exports, "__esModule", { value: true });
const assemble_test_cases_1 = require("./assemble_test_cases");
const helpers_1 = require("./helpers");
const run_test_run_hooks_1 = require("./run_test_run_hooks");
const stopwatch_1 = require("./stopwatch");
const test_case_runner_1 = __importDefault(require("./test_case_runner"));
class Runtime {
eventBroadcaster;
eventDataCollector;
stopwatch;
newId;
options;
pickleIds;
supportCodeLibrary;
success;
runTestRunHooks;
constructor({ eventBroadcaster, eventDataCollector, newId, options, pickleIds, supportCodeLibrary, }) {
this.eventBroadcaster = eventBroadcaster;
this.eventDataCollector = eventDataCollector;
this.stopwatch = (0, stopwatch_1.create)();
this.newId = newId;
this.options = options;
this.pickleIds = pickleIds;
this.supportCodeLibrary = supportCodeLibrary;
this.success = true;
this.runTestRunHooks = (0, run_test_run_hooks_1.makeRunTestRunHooks)(this.options.dryRun, this.supportCodeLibrary.defaultTimeout, this.options.worldParameters, (name, location) => `${name} hook errored, process exiting: ${location}`);
}
async runTestCase(pickleId, testCase) {
const pickle = this.eventDataCollector.getPickle(pickleId);
const retries = (0, helpers_1.retriesForPickle)(pickle, this.options);
const skip = this.options.dryRun || (this.options.failFast && !this.success);
const testCaseRunner = new test_case_runner_1.default({
eventBroadcaster: this.eventBroadcaster,
stopwatch: this.stopwatch,
gherkinDocument: this.eventDataCollector.getGherkinDocument(pickle.uri),
newId: this.newId,
pickle,
testCase,
retries,
skip,
filterStackTraces: this.options.filterStacktraces,
supportCodeLibrary: this.supportCodeLibrary,
worldParameters: this.options.worldParameters,
});
const status = await testCaseRunner.run();
if ((0, helpers_1.shouldCauseFailure)(status, this.options)) {
this.success = false;
}
}
async start() {
const testRunStarted = {
testRunStarted: {
timestamp: this.stopwatch.timestamp(),
},
};
this.eventBroadcaster.emit('envelope', testRunStarted);
this.stopwatch.start();
await this.runTestRunHooks(this.supportCodeLibrary.beforeTestRunHookDefinitions, 'a BeforeAll');
const assembledTestCases = await (0, assemble_test_cases_1.assembleTestCases)({
eventBroadcaster: this.eventBroadcaster,
newId: this.newId,
pickles: this.pickleIds.map((pickleId) => this.eventDataCollector.getPickle(pickleId)),
supportCodeLibrary: this.supportCodeLibrary,
});
for (const pickleId of this.pickleIds) {
await this.runTestCase(pickleId, assembledTestCases[pickleId]);
}
await this.runTestRunHooks(this.supportCodeLibrary.afterTestRunHookDefinitions.slice(0).reverse(), 'an AfterAll');
this.stopwatch.stop();
const testRunFinished = {
testRunFinished: {
timestamp: this.stopwatch.timestamp(),
success: this.success,
},
};
this.eventBroadcaster.emit('envelope', testRunFinished);
return this.success;
}
}
exports.default = Runtime;
__exportStar(require("./make_runtime"), exports);
//# sourceMappingURL=index.js.map
"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
const value_checker_1 = require("../../value_checker");
const worker_1 = __importDefault(require("./worker"));
const worker_1 = require("./worker");
function run() {

@@ -15,3 +12,3 @@ const exit = (exitCode, error, message) => {

};
const worker = new worker_1.default({
const worker = new worker_1.ChildProcessWorker({
id: process.env.CUCUMBER_WORKER_ID,

@@ -18,0 +15,0 @@ sendMessage: (message) => process.send(message),

@@ -1,5 +0,5 @@

import { ICoordinatorReport, IWorkerCommand, IWorkerCommandInitialize, IWorkerCommandRun } from './command_types';
import { WorkerToCoordinatorEvent, CoordinatorToWorkerCommand, InitializeCommand, RunCommand } from './types';
type IExitFunction = (exitCode: number, error?: Error, message?: string) => void;
type IMessageSender = (command: ICoordinatorReport) => void;
export default class Worker {
type IMessageSender = (command: WorkerToCoordinatorEvent) => void;
export declare class ChildProcessWorker {
private readonly cwd;

@@ -9,8 +9,7 @@ private readonly exit;

private readonly eventBroadcaster;
private filterStacktraces;
private readonly newId;
private readonly sendMessage;
private options;
private supportCodeLibrary;
private worldParameters;
private runTestRunHooks;
private worker;
constructor({ cwd, exit, id, sendMessage, }: {

@@ -22,7 +21,7 @@ cwd: string;

});
initialize({ supportCodeCoordinates, supportCodeIds, options, }: IWorkerCommandInitialize): Promise<void>;
initialize({ supportCodeCoordinates, supportCodeIds, options, }: InitializeCommand): Promise<void>;
finalize(): Promise<void>;
receiveMessage(message: IWorkerCommand): Promise<void>;
runTestCase({ gherkinDocument, pickle, testCase, elapsed, retries, skip, }: IWorkerCommandRun): Promise<void>;
receiveMessage(command: CoordinatorToWorkerCommand): Promise<void>;
runTestCase(command: RunCommand): Promise<void>;
}
export {};

@@ -6,2 +6,3 @@ "use strict";

Object.defineProperty(exports, "__esModule", { value: true });
exports.ChildProcessWorker = void 0;
const node_events_1 = require("node:events");

@@ -12,9 +13,6 @@ const node_url_1 = require("node:url");

const support_code_library_builder_1 = __importDefault(require("../../support_code_library_builder"));
const value_checker_1 = require("../../value_checker");
const run_test_run_hooks_1 = require("../run_test_run_hooks");
const stopwatch_1 = require("../stopwatch");
const test_case_runner_1 = __importDefault(require("../test_case_runner"));
const try_require_1 = __importDefault(require("../../try_require"));
const worker_1 = require("../worker");
const { uuid } = messages_1.IdGenerator;
class Worker {
class ChildProcessWorker {
cwd;

@@ -24,8 +22,7 @@ exit;

eventBroadcaster;
filterStacktraces;
newId;
sendMessage;
options;
supportCodeLibrary;
worldParameters;
runTestRunHooks;
worker;
constructor({ cwd, exit, id, sendMessage, }) {

@@ -38,5 +35,3 @@ this.id = id;

this.eventBroadcaster = new node_events_1.EventEmitter();
this.eventBroadcaster.on('envelope', (envelope) => {
this.sendMessage({ jsonEnvelope: envelope });
});
this.eventBroadcaster.on('envelope', (envelope) => this.sendMessage({ type: 'ENVELOPE', envelope }));
}

@@ -54,44 +49,33 @@ async initialize({ supportCodeCoordinates, supportCodeIds, options, }) {

this.supportCodeLibrary = support_code_library_builder_1.default.finalize(supportCodeIds);
this.worldParameters = options.worldParameters;
this.filterStacktraces = options.filterStacktraces;
this.runTestRunHooks = (0, run_test_run_hooks_1.makeRunTestRunHooks)(options.dryRun, this.supportCodeLibrary.defaultTimeout, this.worldParameters, (name, location) => `${name} hook errored on worker ${this.id}, process exiting: ${location}`);
await this.runTestRunHooks(this.supportCodeLibrary.beforeTestRunHookDefinitions, 'a BeforeAll');
this.sendMessage({ ready: true });
this.options = options;
this.worker = new worker_1.Worker(this.id, this.eventBroadcaster, this.newId, this.options, this.supportCodeLibrary);
await this.worker.runBeforeAllHooks();
this.sendMessage({ type: 'READY' });
}
async finalize() {
await this.runTestRunHooks(this.supportCodeLibrary.afterTestRunHookDefinitions, 'an AfterAll');
await this.worker.runAfterAllHooks();
this.exit(0);
}
async receiveMessage(message) {
if ((0, value_checker_1.doesHaveValue)(message.initialize)) {
await this.initialize(message.initialize);
async receiveMessage(command) {
switch (command.type) {
case 'INITIALIZE':
await this.initialize(command);
break;
case 'RUN':
await this.runTestCase(command);
break;
case 'FINALIZE':
await this.finalize();
break;
}
else if (message.finalize) {
await this.finalize();
}
else if ((0, value_checker_1.doesHaveValue)(message.run)) {
await this.runTestCase(message.run);
}
}
async runTestCase({ gherkinDocument, pickle, testCase, elapsed, retries, skip, }) {
const stopwatch = (0, stopwatch_1.create)(elapsed);
const testCaseRunner = new test_case_runner_1.default({
workerId: this.id,
eventBroadcaster: this.eventBroadcaster,
stopwatch,
gherkinDocument,
newId: this.newId,
pickle,
testCase,
retries,
skip,
filterStackTraces: this.filterStacktraces,
supportCodeLibrary: this.supportCodeLibrary,
worldParameters: this.worldParameters,
async runTestCase(command) {
const success = await this.worker.runTestCase(command.assembledTestCase, command.failing);
this.sendMessage({
type: 'FINISHED',
success,
});
await testCaseRunner.run();
this.sendMessage({ ready: true });
}
}
exports.default = Worker;
exports.ChildProcessWorker = ChildProcessWorker;
//# sourceMappingURL=worker.js.map

@@ -1,2 +0,2 @@

import { Duration, Timestamp } from '@cucumber/messages';
import { Duration } from '@cucumber/messages';
/**

@@ -10,4 +10,4 @@ * A utility for timing test run operations and returning duration and

duration: () => Duration;
timestamp: () => Timestamp;
}
export declare const create: (base?: Duration) => IStopwatch;
export declare const timestamp: () => import("@cucumber/messages").Timestamp;

@@ -6,3 +6,3 @@ "use strict";

Object.defineProperty(exports, "__esModule", { value: true });
exports.create = void 0;
exports.timestamp = exports.create = void 0;
const messages_1 = require("@cucumber/messages");

@@ -31,8 +31,7 @@ const time_1 = __importDefault(require("../time"));

}
timestamp() {
return messages_1.TimeConversion.millisecondsSinceEpochToTimestamp(time_1.default.Date.now());
}
}
const create = (base) => new StopwatchImpl(base);
exports.create = create;
const timestamp = () => messages_1.TimeConversion.millisecondsSinceEpochToTimestamp(time_1.default.Date.now());
exports.timestamp = timestamp;
//# sourceMappingURL=stopwatch.js.map

@@ -10,7 +10,5 @@ /// <reference types="node" />

import { IDefinition } from '../models/definition';
import { IStopwatch } from './stopwatch';
export interface INewTestCaseRunnerOptions {
workerId?: string;
eventBroadcaster: EventEmitter;
stopwatch: IStopwatch;
gherkinDocument: messages.GherkinDocument;

@@ -32,3 +30,2 @@ newId: IdGenerator.NewId;

private readonly eventBroadcaster;
private readonly stopwatch;
private readonly gherkinDocument;

@@ -45,3 +42,3 @@ private readonly newId;

private readonly worldParameters;
constructor({ workerId, eventBroadcaster, stopwatch, gherkinDocument, newId, pickle, testCase, retries, skip, filterStackTraces, supportCodeLibrary, worldParameters, }: INewTestCaseRunnerOptions);
constructor({ workerId, eventBroadcaster, gherkinDocument, newId, pickle, testCase, retries, skip, filterStackTraces, supportCodeLibrary, worldParameters, }: INewTestCaseRunnerOptions);
resetTestProgressData(): void;

@@ -48,0 +45,0 @@ getBeforeStepHookDefinitions(): TestStepHookDefinition[];

@@ -32,2 +32,3 @@ "use strict";

const value_checker_1 = require("../value_checker");
const stopwatch_1 = require("./stopwatch");
const step_runner_1 = __importDefault(require("./step_runner"));

@@ -42,3 +43,2 @@ const attachment_manager_1 = __importDefault(require("./attachment_manager"));

eventBroadcaster;
stopwatch;
gherkinDocument;

@@ -55,3 +55,3 @@ newId;

worldParameters;
constructor({ workerId, eventBroadcaster, stopwatch, gherkinDocument, newId, pickle, testCase, retries = 0, skip, filterStackTraces, supportCodeLibrary, worldParameters, }) {
constructor({ workerId, eventBroadcaster, gherkinDocument, newId, pickle, testCase, retries = 0, skip, filterStackTraces, supportCodeLibrary, worldParameters, }) {
this.workerId = workerId;

@@ -75,3 +75,2 @@ this.attachmentManager = new attachment_manager_1.default(({ data, media, fileName }) => {

this.eventBroadcaster = eventBroadcaster;
this.stopwatch = stopwatch;
this.gherkinDocument = gherkinDocument;

@@ -138,3 +137,3 @@ this.maxAttempts = 1 + (skip ? 0 : retries);

testStepId,
timestamp: this.stopwatch.timestamp(),
timestamp: (0, stopwatch_1.timestamp)(),
},

@@ -152,3 +151,3 @@ };

testStepResult,
timestamp: this.stopwatch.timestamp(),
timestamp: (0, stopwatch_1.timestamp)(),
},

@@ -176,3 +175,3 @@ };

id: this.currentTestCaseStartedId,
timestamp: this.stopwatch.timestamp(),
timestamp: (0, stopwatch_1.timestamp)(),
},

@@ -215,3 +214,3 @@ };

testCaseStartedId: this.currentTestCaseStartedId,
timestamp: this.stopwatch.timestamp(),
timestamp: (0, stopwatch_1.timestamp)(),
willBeRetried,

@@ -218,0 +217,0 @@ },

@@ -7,5 +7,4 @@ import { IdGenerator } from '@cucumber/messages';

import StepDefinition from '../models/step_definition';
import { ICanonicalSupportCodeIds } from '../runtime/parallel/command_types';
import { GherkinStepKeyword } from '../models/gherkin_step_keyword';
import { IDefineSupportCodeMethods, IDefineTestCaseHookOptions, IDefineTestStepHookOptions, IDefineTestRunHookOptions, IParameterTypeDefinition, SupportCodeLibrary, TestCaseHookFunction, TestStepHookFunction, ISupportCodeCoordinates, IDefineStep } from './types';
import { IDefineSupportCodeMethods, IDefineTestCaseHookOptions, IDefineTestStepHookOptions, IDefineTestRunHookOptions, IParameterTypeDefinition, SupportCodeLibrary, TestCaseHookFunction, TestStepHookFunction, ISupportCodeCoordinates, IDefineStep, CanonicalSupportCodeIds } from './types';
interface IStepDefinitionConfig {

@@ -72,3 +71,3 @@ code: Function;

};
finalize(canonicalIds?: ICanonicalSupportCodeIds): SupportCodeLibrary;
finalize(canonicalIds?: CanonicalSupportCodeIds): SupportCodeLibrary;
reset(cwd: string, newId: IdGenerator.NewId, originalCoordinates?: ISupportCodeCoordinates): void;

@@ -75,0 +74,0 @@ }

@@ -79,2 +79,7 @@ import * as messages from '@cucumber/messages';

}
export interface CanonicalSupportCodeIds {
stepDefinitionIds: string[];
beforeTestCaseHookDefinitionIds: string[];
afterTestCaseHookDefinitionIds: string[];
}
export interface SupportCodeLibrary {

@@ -81,0 +86,0 @@ readonly originalCoordinates: ISupportCodeCoordinates;

@@ -1,1 +0,1 @@

export declare const version = "10.9.0";
export declare const version = "11.0.0";

@@ -5,3 +5,3 @@ "use strict";

// Generated by genversion.
exports.version = '10.9.0';
exports.version = '11.0.0';
//# sourceMappingURL=version.js.map

@@ -11,3 +11,3 @@ {

],
"version": "10.9.0",
"version": "11.0.0",
"funding": "https://opencollective.com/cucumber",

@@ -211,6 +211,6 @@ "homepage": "https://github.com/cucumber/cucumber-js",

"engines": {
"node": "18 || >=20"
"node": "18 || 20 || >=22"
},
"enginesTested": {
"node": "18 || 20 || 21 || 22"
"node": "18 || 20 || 22"
},

@@ -217,0 +217,0 @@ "dependencies": {

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc