@cucumber/cucumber 7.0.0 → 7.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +63 -17
- package/README.md +8 -11
- package/lib/cli/argv_parser.js.map +1 -1
- package/lib/cli/configuration_builder.js +3 -3
- package/lib/cli/configuration_builder.js.map +1 -1
- package/lib/cli/helpers.js +40 -18
- package/lib/cli/helpers.js.map +1 -1
- package/lib/cli/i18n.js.map +1 -1
- package/lib/cli/index.js +40 -23
- package/lib/cli/index.js.map +1 -1
- package/lib/cli/install_validator.js.map +1 -1
- package/lib/cli/option_splitter.js.map +1 -1
- package/lib/cli/profile_loader.d.ts +1 -2
- package/lib/cli/profile_loader.js.map +1 -1
- package/lib/cli/publish_banner.js.map +1 -1
- package/lib/cli/run.js.map +1 -1
- package/lib/formatter/builder.js.map +1 -1
- package/lib/formatter/get_color_fns.d.ts +2 -2
- package/lib/formatter/get_color_fns.js +7 -8
- package/lib/formatter/get_color_fns.js.map +1 -1
- package/lib/formatter/helpers/event_data_collector.d.ts +14 -17
- package/lib/formatter/helpers/event_data_collector.js +14 -8
- package/lib/formatter/helpers/event_data_collector.js.map +1 -1
- package/lib/formatter/helpers/gherkin_document_parser.d.ts +5 -6
- package/lib/formatter/helpers/gherkin_document_parser.js +1 -4
- package/lib/formatter/helpers/gherkin_document_parser.js.map +1 -1
- package/lib/formatter/helpers/index.js.map +1 -1
- package/lib/formatter/helpers/issue_helpers.d.ts +6 -6
- package/lib/formatter/helpers/issue_helpers.js +5 -6
- package/lib/formatter/helpers/issue_helpers.js.map +1 -1
- package/lib/formatter/helpers/keyword_type.js.map +1 -1
- package/lib/formatter/helpers/location_helpers.js.map +1 -1
- package/lib/formatter/helpers/pickle_parser.d.ts +9 -10
- package/lib/formatter/helpers/pickle_parser.js.map +1 -1
- package/lib/formatter/helpers/step_argument_formatter.d.ts +2 -2
- package/lib/formatter/helpers/step_argument_formatter.js.map +1 -1
- package/lib/formatter/helpers/summary_helpers.d.ts +2 -2
- package/lib/formatter/helpers/summary_helpers.js +32 -14
- package/lib/formatter/helpers/summary_helpers.js.map +1 -1
- package/lib/formatter/helpers/test_case_attempt_formatter.js +33 -14
- package/lib/formatter/helpers/test_case_attempt_formatter.js.map +1 -1
- package/lib/formatter/helpers/test_case_attempt_parser.d.ts +5 -5
- package/lib/formatter/helpers/test_case_attempt_parser.js +27 -9
- package/lib/formatter/helpers/test_case_attempt_parser.js.map +1 -1
- package/lib/formatter/helpers/usage_helpers/index.d.ts +3 -3
- package/lib/formatter/helpers/usage_helpers/index.js +30 -13
- package/lib/formatter/helpers/usage_helpers/index.js.map +1 -1
- package/lib/formatter/html_formatter.js +2 -2
- package/lib/formatter/html_formatter.js.map +1 -1
- package/lib/formatter/http_stream.d.ts +8 -9
- package/lib/formatter/http_stream.js +58 -54
- package/lib/formatter/http_stream.js.map +1 -1
- package/lib/formatter/index.js.map +1 -1
- package/lib/formatter/json_formatter.d.ts +21 -27
- package/lib/formatter/json_formatter.js +50 -23
- package/lib/formatter/json_formatter.js.map +1 -1
- package/lib/formatter/message_formatter.js +1 -1
- package/lib/formatter/message_formatter.js.map +1 -1
- package/lib/formatter/progress_bar_formatter.d.ts +6 -6
- package/lib/formatter/progress_bar_formatter.js +3 -3
- package/lib/formatter/progress_bar_formatter.js.map +1 -1
- package/lib/formatter/progress_formatter.d.ts +2 -2
- package/lib/formatter/progress_formatter.js +29 -10
- package/lib/formatter/progress_formatter.js.map +1 -1
- package/lib/formatter/rerun_formatter.js +22 -4
- package/lib/formatter/rerun_formatter.js.map +1 -1
- package/lib/formatter/snippets_formatter.js +22 -3
- package/lib/formatter/snippets_formatter.js.map +1 -1
- package/lib/formatter/step_definition_snippet_builder/index.d.ts +3 -3
- package/lib/formatter/step_definition_snippet_builder/index.js +1 -1
- package/lib/formatter/step_definition_snippet_builder/index.js.map +1 -1
- package/lib/formatter/step_definition_snippet_builder/javascript_snippet_syntax.js.map +1 -1
- package/lib/formatter/step_definition_snippet_builder/snippet_syntax.js.map +1 -1
- package/lib/formatter/summary_formatter.d.ts +2 -2
- package/lib/formatter/summary_formatter.js.map +1 -1
- package/lib/formatter/usage_formatter.js +22 -3
- package/lib/formatter/usage_formatter.js.map +1 -1
- package/lib/formatter/usage_json_formatter.js.map +1 -1
- package/lib/index.d.ts +14 -12
- package/lib/index.js +3 -3
- package/lib/index.js.map +1 -1
- package/lib/models/data_table.d.ts +3 -4
- package/lib/models/data_table.js.map +1 -1
- package/lib/models/definition.d.ts +2 -2
- package/lib/models/definition.js.map +1 -1
- package/lib/models/step_definition.js.map +1 -1
- package/lib/models/test_case_hook_definition.d.ts +2 -2
- package/lib/models/test_case_hook_definition.js.map +1 -1
- package/lib/models/test_run_hook_definition.js.map +1 -1
- package/lib/models/test_step_hook_definition.d.ts +2 -2
- package/lib/models/test_step_hook_definition.js.map +1 -1
- package/lib/pickle_filter.d.ts +9 -11
- package/lib/pickle_filter.js +4 -4
- package/lib/pickle_filter.js.map +1 -1
- package/lib/runtime/assemble_test_cases.d.ts +13 -0
- package/lib/runtime/assemble_test_cases.js +88 -0
- package/lib/runtime/assemble_test_cases.js.map +1 -0
- package/lib/runtime/attachment_manager/index.d.ts +6 -6
- package/lib/runtime/attachment_manager/index.js +33 -6
- package/lib/runtime/attachment_manager/index.js.map +1 -1
- package/lib/runtime/helpers.d.ts +2 -2
- package/lib/runtime/helpers.js.map +1 -1
- package/lib/runtime/index.d.ts +4 -3
- package/lib/runtime/index.js +31 -13
- package/lib/runtime/index.js.map +1 -1
- package/lib/runtime/parallel/command_types.d.ts +10 -9
- package/lib/runtime/parallel/command_types.js.map +1 -1
- package/lib/runtime/parallel/coordinator.d.ts +10 -9
- package/lib/runtime/parallel/coordinator.js +54 -43
- package/lib/runtime/parallel/coordinator.js.map +1 -1
- package/lib/runtime/parallel/run_worker.js.map +1 -1
- package/lib/runtime/parallel/worker.d.ts +2 -2
- package/lib/runtime/parallel/worker.js +8 -14
- package/lib/runtime/parallel/worker.js.map +1 -1
- package/lib/runtime/step_runner.d.ts +3 -3
- package/lib/runtime/step_runner.js +16 -12
- package/lib/runtime/step_runner.js.map +1 -1
- package/lib/runtime/stopwatch.d.ts +4 -4
- package/lib/runtime/stopwatch.js +21 -2
- package/lib/runtime/stopwatch.js.map +1 -1
- package/lib/runtime/{pickle_runner.d.ts → test_case_runner.d.ts} +16 -32
- package/lib/runtime/{pickle_runner.js → test_case_runner.js} +104 -147
- package/lib/runtime/test_case_runner.js.map +1 -0
- package/lib/stack_trace_filter.js.map +1 -1
- package/lib/step_arguments.d.ts +4 -4
- package/lib/step_arguments.js.map +1 -1
- package/lib/support_code_library_builder/build_helpers.js.map +1 -1
- package/lib/support_code_library_builder/finalize_helpers.js.map +1 -1
- package/lib/support_code_library_builder/index.d.ts +9 -7
- package/lib/support_code_library_builder/index.js +10 -10
- package/lib/support_code_library_builder/index.js.map +1 -1
- package/lib/support_code_library_builder/types.d.ts +20 -22
- package/lib/support_code_library_builder/types.js.map +1 -1
- package/lib/support_code_library_builder/validate_arguments.js.map +1 -1
- package/lib/support_code_library_builder/world.d.ts +7 -1
- package/lib/support_code_library_builder/world.js.map +1 -1
- package/lib/time.d.ts +2 -10
- package/lib/time.js +24 -48
- package/lib/time.js.map +1 -1
- package/lib/types/index.js.map +1 -1
- package/lib/uncaught_exception_manager.js +2 -12
- package/lib/uncaught_exception_manager.js.map +1 -1
- package/lib/user_code_runner.js.map +1 -1
- package/lib/value_checker.js.map +1 -1
- package/package.json +49 -46
- package/lib/runtime/pickle_runner.js.map +0 -1
- package/lib/status.d.ts +0 -3
- package/lib/status.js +0 -5
- package/lib/status.js.map +0 -1
package/lib/cli/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/cli/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAAA,kDAAyD;AACzD,uCAKkB;AAClB,2DAAqD;AACrD,6CAA8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C,gBAAgB;gBAChD,0BAA0B,EAAE,aAAa,CAAC,0BAA0B;aACrE,CAAC,CAAA;YACF,OAAO,GAAG,MAAM,0BAA0B,CAAC,GAAG,CAAC,aAAa,CAAC,QAAQ,CAAC,CAAA;SACvE;aAAM;YACL,MAAM,OAAO,GAAG,IAAI,iBAAO,CAAC;gBAC1B,gBAAgB;gBAChB,kBAAkB;gBAClB,OAAO,EAAE,aAAa,CAAC,cAAc;gBACrC,KAAK;gBACL,SAAS;gBACT,kBAAkB;aACnB,CAAC,CAAA;YACF,OAAO,GAAG,MAAM,OAAO,CAAC,KAAK,EAAE,CAAA;SAChC;QACD,MAAM,OAAO,EAAE,CAAA;QACf,OAAO;YACL,qBAAqB,EAAE,aAAa,CAAC,qBAAqB;YAC1D,OAAO;SACR,CAAA;IACH,CAAC;CACF;AA/MD,sBA+MC","sourcesContent":["import { EventDataCollector } from '../formatter/helpers'\nimport {\n emitMetaMessage,\n emitSupportCodeMessages,\n getExpandedArgv,\n parseGherkinMessageStream,\n} from './helpers'\nimport { validateInstall } from './install_validator'\nimport * as I18n from './i18n'\nimport ConfigurationBuilder, {\n IConfiguration,\n IConfigurationFormat,\n} from './configuration_builder'\nimport { EventEmitter } from 'events'\nimport FormatterBuilder from '../formatter/builder'\nimport fs from 'mz/fs'\nimport path from 'path'\nimport PickleFilter from '../pickle_filter'\nimport bluebird from 'bluebird'\nimport ParallelRuntimeCoordinator from '../runtime/parallel/coordinator'\nimport Runtime from '../runtime'\nimport supportCodeLibraryBuilder from '../support_code_library_builder'\nimport { IdGenerator } from '@cucumber/messages'\nimport { IFormatterStream } from '../formatter'\nimport { WriteStream as TtyWriteStream } from 'tty'\nimport { doesNotHaveValue } from '../value_checker'\nimport { GherkinStreams } from '@cucumber/gherkin-streams'\nimport { ISupportCodeLibrary } from '../support_code_library_builder/types'\nimport { IParsedArgvFormatOptions } from './argv_parser'\nimport HttpStream from '../formatter/http_stream'\nimport { Writable } from 'stream'\n\nconst { incrementing, uuid } = IdGenerator\n\nexport interface ICliRunResult {\n shouldExitImmediately: boolean\n success: boolean\n}\n\ninterface IInitializeFormattersRequest {\n eventBroadcaster: EventEmitter\n eventDataCollector: EventDataCollector\n formatOptions: IParsedArgvFormatOptions\n formats: IConfigurationFormat[]\n supportCodeLibrary: ISupportCodeLibrary\n}\n\ninterface IGetSupportCodeLibraryRequest {\n newId: IdGenerator.NewId\n supportCodeRequiredModules: string[]\n supportCodePaths: string[]\n}\n\nexport default class Cli {\n private readonly argv: string[]\n private readonly cwd: string\n private readonly stdout: IFormatterStream\n\n constructor({\n argv,\n cwd,\n stdout,\n }: {\n argv: string[]\n cwd: string\n stdout: IFormatterStream\n }) {\n this.argv = argv\n this.cwd = cwd\n this.stdout = stdout\n }\n\n async getConfiguration(): Promise<IConfiguration> {\n const fullArgv = await getExpandedArgv({\n argv: this.argv,\n cwd: this.cwd,\n })\n return await ConfigurationBuilder.build({\n argv: fullArgv,\n cwd: this.cwd,\n })\n }\n\n async initializeFormatters({\n eventBroadcaster,\n eventDataCollector,\n formatOptions,\n formats,\n supportCodeLibrary,\n }: IInitializeFormattersRequest): Promise<() => Promise<void>> {\n const formatters = await bluebird.map(\n formats,\n async ({ type, outputTo }) => {\n let stream: IFormatterStream = this.stdout\n if (outputTo !== '') {\n if (outputTo.match(/^https?:\\/\\//) !== null) {\n const headers: { [key: string]: string } = {}\n if (process.env.CUCUMBER_PUBLISH_TOKEN !== undefined) {\n headers.Authorization = `Bearer ${process.env.CUCUMBER_PUBLISH_TOKEN}`\n }\n\n stream = new HttpStream(outputTo, 'GET', headers)\n const readerStream = new Writable({\n objectMode: true,\n write: function (responseBody: string, encoding, writeCallback) {\n console.error(responseBody)\n writeCallback()\n },\n })\n stream.pipe(readerStream)\n } else {\n const fd = await fs.open(path.resolve(this.cwd, outputTo), 'w')\n stream = fs.createWriteStream(null, { fd })\n }\n }\n\n stream.on('error', (error) => {\n console.error(error.message)\n process.exit(1)\n })\n\n const typeOptions = {\n cwd: this.cwd,\n eventBroadcaster,\n eventDataCollector,\n log: stream.write.bind(stream),\n parsedArgvOptions: formatOptions,\n stream,\n cleanup:\n stream === this.stdout\n ? async () => await Promise.resolve()\n : bluebird.promisify(stream.end.bind(stream)),\n supportCodeLibrary,\n }\n if (doesNotHaveValue(formatOptions.colorsEnabled)) {\n typeOptions.parsedArgvOptions.colorsEnabled = (\n stream as TtyWriteStream\n ).isTTY\n }\n if (type === 'progress-bar' && !(stream as TtyWriteStream).isTTY) {\n const outputToName = outputTo === '' ? 'stdout' : outputTo\n console.warn(\n `Cannot use 'progress-bar' formatter for output to '${outputToName}' as not a TTY. Switching to 'progress' formatter.`\n )\n type = 'progress'\n }\n return FormatterBuilder.build(type, typeOptions)\n }\n )\n return async function () {\n await bluebird.each(formatters, async (formatter) => {\n await formatter.finished()\n })\n }\n }\n\n getSupportCodeLibrary({\n newId,\n supportCodeRequiredModules,\n supportCodePaths,\n }: IGetSupportCodeLibraryRequest): ISupportCodeLibrary {\n supportCodeRequiredModules.map((module) => require(module))\n supportCodeLibraryBuilder.reset(this.cwd, newId)\n supportCodePaths.forEach((codePath) => {\n try {\n require(codePath)\n } catch (e) {\n console.error(e.stack)\n console.error('codepath: ' + codePath)\n }\n })\n return supportCodeLibraryBuilder.finalize()\n }\n\n async run(): Promise<ICliRunResult> {\n await validateInstall(this.cwd)\n const configuration = await this.getConfiguration()\n if (configuration.listI18nLanguages) {\n this.stdout.write(I18n.getLanguages())\n return { shouldExitImmediately: true, success: true }\n }\n if (configuration.listI18nKeywordsFor !== '') {\n this.stdout.write(I18n.getKeywords(configuration.listI18nKeywordsFor))\n return { shouldExitImmediately: true, success: true }\n }\n const newId =\n configuration.predictableIds && configuration.parallel <= 1\n ? incrementing()\n : uuid()\n const supportCodeLibrary = this.getSupportCodeLibrary({\n newId,\n supportCodePaths: configuration.supportCodePaths,\n supportCodeRequiredModules: configuration.supportCodeRequiredModules,\n })\n const eventBroadcaster = new EventEmitter()\n const eventDataCollector = new EventDataCollector(eventBroadcaster)\n const cleanup = await this.initializeFormatters({\n eventBroadcaster,\n eventDataCollector,\n formatOptions: configuration.formatOptions,\n formats: configuration.formats,\n supportCodeLibrary,\n })\n await emitMetaMessage(eventBroadcaster)\n const gherkinMessageStream = GherkinStreams.fromPaths(\n configuration.featurePaths,\n {\n defaultDialect: configuration.featureDefaultLanguage,\n newId,\n relativeTo: this.cwd,\n }\n )\n let pickleIds: string[] = []\n\n if (configuration.featurePaths.length > 0) {\n pickleIds = await parseGherkinMessageStream({\n cwd: this.cwd,\n eventBroadcaster,\n eventDataCollector,\n gherkinMessageStream,\n order: configuration.order,\n pickleFilter: new PickleFilter(configuration.pickleFilterOptions),\n })\n }\n emitSupportCodeMessages({\n eventBroadcaster,\n supportCodeLibrary,\n newId,\n })\n let success\n if (configuration.parallel > 1) {\n const parallelRuntimeCoordinator = new ParallelRuntimeCoordinator({\n cwd: this.cwd,\n eventBroadcaster,\n eventDataCollector,\n options: configuration.runtimeOptions,\n newId,\n pickleIds,\n supportCodeLibrary,\n supportCodePaths: configuration.supportCodePaths,\n supportCodeRequiredModules: configuration.supportCodeRequiredModules,\n })\n success = await parallelRuntimeCoordinator.run(configuration.parallel)\n } else {\n const runtime = new Runtime({\n eventBroadcaster,\n eventDataCollector,\n options: configuration.runtimeOptions,\n newId,\n pickleIds,\n supportCodeLibrary,\n })\n success = await runtime.start()\n }\n await cleanup()\n return {\n shouldExitImmediately: configuration.shouldExitImmediately,\n success,\n }\n }\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"install_validator.js","sourceRoot":"","sources":["../../src/cli/install_validator.ts"],"names":[],"mappings":";;;;;;AAAA,+CAAsB;AACtB,gDAAuB;AACvB,sDAA6B;AAC7B,+BAAgC;AAEzB,KAAK,UAAU,eAAe,CAAC,GAAW;IAC/C,MAAM,WAAW,GAAG,cAAI,CAAC,IAAI,CAAC,SAAS,EAAE,IAAI,EAAE,IAAI,CAAC,CAAA;IACpD,IAAI,WAAW,KAAK,GAAG,EAAE;QACvB,OAAM,CAAC,0BAA0B;KAClC;IACD,MAAM,mBAAmB,GAAG,OAAO,CAAC,OAAO,CAAC,WAAW,CAAC,CAAA;IACxD,IAAI,iBAAyB,CAAA;IAC7B,IAAI;QACF,iBAAiB,GAAG,MAAM,gBAAS,CAA+B,iBAAO,CAAC,CACxE,oBAAoB,EACpB;YACE,OAAO,EAAE,GAAG;SACb,CACF,CAAA;KACF;IAAC,OAAO,CAAC,EAAE;QACV,MAAM,IAAI,KAAK,CACb,wEAAwE,CACzE,CAAA;KACF;IACD,iBAAiB,GAAG,MAAM,YAAE,CAAC,QAAQ,CAAC,iBAAiB,CAAC,CAAA;IACxD,IAAI,iBAAiB,KAAK,mBAAmB,EAAE;QAC7C,MAAM,IAAI,KAAK,CACb;;;;;;uBAMiB,mBAAmB;uBACnB,iBAAiB;OACjC,CACF,CAAA;KACF;AACH,CAAC;AAjCD,0CAiCC"}
|
|
1
|
+
{"version":3,"file":"install_validator.js","sourceRoot":"","sources":["../../src/cli/install_validator.ts"],"names":[],"mappings":";;;;;;AAAA,+CAAsB;AACtB,gDAAuB;AACvB,sDAA6B;AAC7B,+BAAgC;AAEzB,KAAK,UAAU,eAAe,CAAC,GAAW;IAC/C,MAAM,WAAW,GAAG,cAAI,CAAC,IAAI,CAAC,SAAS,EAAE,IAAI,EAAE,IAAI,CAAC,CAAA;IACpD,IAAI,WAAW,KAAK,GAAG,EAAE;QACvB,OAAM,CAAC,0BAA0B;KAClC;IACD,MAAM,mBAAmB,GAAG,OAAO,CAAC,OAAO,CAAC,WAAW,CAAC,CAAA;IACxD,IAAI,iBAAyB,CAAA;IAC7B,IAAI;QACF,iBAAiB,GAAG,MAAM,gBAAS,CAA+B,iBAAO,CAAC,CACxE,oBAAoB,EACpB;YACE,OAAO,EAAE,GAAG;SACb,CACF,CAAA;KACF;IAAC,OAAO,CAAC,EAAE;QACV,MAAM,IAAI,KAAK,CACb,wEAAwE,CACzE,CAAA;KACF;IACD,iBAAiB,GAAG,MAAM,YAAE,CAAC,QAAQ,CAAC,iBAAiB,CAAC,CAAA;IACxD,IAAI,iBAAiB,KAAK,mBAAmB,EAAE;QAC7C,MAAM,IAAI,KAAK,CACb;;;;;;uBAMiB,mBAAmB;uBACnB,iBAAiB;OACjC,CACF,CAAA;KACF;AACH,CAAC;AAjCD,0CAiCC","sourcesContent":["import fs from 'mz/fs'\nimport path from 'path'\nimport resolve from 'resolve'\nimport { promisify } from 'util'\n\nexport async function validateInstall(cwd: string): Promise<void> {\n const projectPath = path.join(__dirname, '..', '..')\n if (projectPath === cwd) {\n return // cucumber testing itself\n }\n const currentCucumberPath = require.resolve(projectPath)\n let localCucumberPath: string\n try {\n localCucumberPath = await promisify<string, resolve.Opts, string>(resolve)(\n '@cucumber/cucumber',\n {\n basedir: cwd,\n }\n )\n } catch (e) {\n throw new Error(\n '`@cucumber/cucumber` module not resolvable. Must be locally installed.'\n )\n }\n localCucumberPath = await fs.realpath(localCucumberPath)\n if (localCucumberPath !== currentCucumberPath) {\n throw new Error(\n `\n You appear to be executing an install of cucumber (most likely a global install)\n that is different from your local install (the one required in your support files).\n For cucumber to work, you need to execute the same install that is required in your support files.\n Please execute the locally installed version to run your tests.\n\n Executed Path: ${currentCucumberPath}\n Local Path: ${localCucumberPath}\n `\n )\n }\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"option_splitter.js","sourceRoot":"","sources":["../../src/cli/option_splitter.ts"],"names":[],"mappings":";;AAAA,MAAM,cAAc,GAAG;IACrB,KAAK,CAAC,MAAc;QAClB,MAAM,KAAK,GAAG,MAAM,CAAC,KAAK,CAAC,iBAAiB,CAAC,CAAA;QAE7C,MAAM,MAAM,GAAG,KAAK,CAAC,MAAM,CAAC,CAAC,IAAc,EAAE,IAAY,EAAE,CAAS,EAAE,EAAE;YACtE,IAAI,mBAAmB,CAAC,CAAC,CAAC,EAAE;gBAC1B,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,CAAA;aAC1C;YAED,OAAO,IAAI,CAAA;QACb,CAAC,EAAE,EAAE,CAAC,CAAA;QAEN,IAAI,MAAM,CAAC,MAAM,KAAK,CAAC,EAAE;YACvB,MAAM,CAAC,IAAI,CAAC,EAAE,CAAC,CAAA;SAChB;QAED,OAAO,MAAM,CAAA;IACf,CAAC;CACF,CAAA;AAED,SAAS,mBAAmB,CAAC,CAAS;IACpC,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,CAAA;AACpB,CAAC;AAED,kBAAe,cAAc,CAAA"}
|
|
1
|
+
{"version":3,"file":"option_splitter.js","sourceRoot":"","sources":["../../src/cli/option_splitter.ts"],"names":[],"mappings":";;AAAA,MAAM,cAAc,GAAG;IACrB,KAAK,CAAC,MAAc;QAClB,MAAM,KAAK,GAAG,MAAM,CAAC,KAAK,CAAC,iBAAiB,CAAC,CAAA;QAE7C,MAAM,MAAM,GAAG,KAAK,CAAC,MAAM,CAAC,CAAC,IAAc,EAAE,IAAY,EAAE,CAAS,EAAE,EAAE;YACtE,IAAI,mBAAmB,CAAC,CAAC,CAAC,EAAE;gBAC1B,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,CAAA;aAC1C;YAED,OAAO,IAAI,CAAA;QACb,CAAC,EAAE,EAAE,CAAC,CAAA;QAEN,IAAI,MAAM,CAAC,MAAM,KAAK,CAAC,EAAE;YACvB,MAAM,CAAC,IAAI,CAAC,EAAE,CAAC,CAAA;SAChB;QAED,OAAO,MAAM,CAAA;IACf,CAAC;CACF,CAAA;AAED,SAAS,mBAAmB,CAAC,CAAS;IACpC,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,CAAA;AACpB,CAAC;AAED,kBAAe,cAAc,CAAA","sourcesContent":["const OptionSplitter = {\n split(option: string): string[] {\n const parts = option.split(/([^A-Z]):(?!\\\\)/)\n\n const result = parts.reduce((memo: string[], part: string, i: number) => {\n if (partNeedsRecombined(i)) {\n memo.push(parts.slice(i, i + 2).join(''))\n }\n\n return memo\n }, [])\n\n if (result.length === 1) {\n result.push('')\n }\n\n return result\n },\n}\n\nfunction partNeedsRecombined(i: number): boolean {\n return i % 2 === 0\n}\n\nexport default OptionSplitter\n"]}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import { Dictionary } from 'lodash';
|
|
2
1
|
export default class ProfileLoader {
|
|
3
2
|
private readonly directory;
|
|
4
3
|
constructor(directory: string);
|
|
5
|
-
getDefinitions(): Promise<
|
|
4
|
+
getDefinitions(): Promise<Record<string, string>>;
|
|
6
5
|
getArgv(profiles: string[]): Promise<string[]>;
|
|
7
6
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"profile_loader.js","sourceRoot":"","sources":["../../src/cli/profile_loader.ts"],"names":[],"mappings":";;;;;AAAA,
|
|
1
|
+
{"version":3,"file":"profile_loader.js","sourceRoot":"","sources":["../../src/cli/profile_loader.ts"],"names":[],"mappings":";;;;;AAAA,oDAAsB;AACtB,+CAAsB;AACtB,gDAAuB;AACvB,8DAAoC;AACpC,oDAAkE;AAElE,MAAqB,aAAa;IAGhC,YAAY,SAAiB;QAC3B,IAAI,CAAC,SAAS,GAAG,SAAS,CAAA;IAC5B,CAAC;IAED,KAAK,CAAC,cAAc;QAClB,MAAM,mBAAmB,GAAG,cAAI,CAAC,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,aAAa,CAAC,CAAA;QACpE,MAAM,MAAM,GAAG,MAAM,YAAE,CAAC,MAAM,CAAC,mBAAmB,CAAC,CAAA;QACnD,IAAI,CAAC,MAAM,EAAE;YACX,OAAO,EAAE,CAAA;SACV;QACD,MAAM,WAAW,GAAG,OAAO,CAAC,mBAAmB,CAAC,CAAA,CAAC,yDAAyD;QAC1G,IAAI,OAAO,WAAW,KAAK,QAAQ,EAAE;YACnC,MAAM,IAAI,KAAK,CAAC,GAAG,mBAAmB,4BAA4B,CAAC,CAAA;SACpE;QACD,OAAO,WAAW,CAAA;IACpB,CAAC;IAED,KAAK,CAAC,OAAO,CAAC,QAAkB;QAC9B,MAAM,WAAW,GAAG,MAAM,IAAI,CAAC,cAAc,EAAE,CAAA;QAC/C,IAAI,QAAQ,CAAC,MAAM,KAAK,CAAC,IAAI,6BAAa,CAAC,WAAW,CAAC,OAAO,CAAC,EAAE;YAC/D,QAAQ,GAAG,CAAC,SAAS,CAAC,CAAA;SACvB;QACD,MAAM,KAAK,GAAG,QAAQ,CAAC,GAAG,CAAC,CAAC,OAAO,EAAE,EAAE;YACrC,IAAI,gCAAgB,CAAC,WAAW,CAAC,OAAO,CAAC,CAAC,EAAE;gBAC1C,MAAM,IAAI,KAAK,CAAC,sBAAsB,OAAO,EAAE,CAAC,CAAA;aACjD;YACD,OAAO,qBAAU,CAAC,WAAW,CAAC,OAAO,CAAC,CAAC,CAAA;QACzC,CAAC,CAAC,CAAA;QACF,OAAO,gBAAC,CAAC,OAAO,CAAC,KAAK,CAAC,CAAA;IACzB,CAAC;CACF;AAjCD,gCAiCC","sourcesContent":["import _ from 'lodash'\nimport fs from 'mz/fs'\nimport path from 'path'\nimport stringArgv from 'string-argv'\nimport { doesHaveValue, doesNotHaveValue } from '../value_checker'\n\nexport default class ProfileLoader {\n private readonly directory: string\n\n constructor(directory: string) {\n this.directory = directory\n }\n\n async getDefinitions(): Promise<Record<string, string>> {\n const definitionsFilePath = path.join(this.directory, 'cucumber.js')\n const exists = await fs.exists(definitionsFilePath)\n if (!exists) {\n return {}\n }\n const definitions = require(definitionsFilePath) // eslint-disable-line @typescript-eslint/no-var-requires\n if (typeof definitions !== 'object') {\n throw new Error(`${definitionsFilePath} does not export an object`)\n }\n return definitions\n }\n\n async getArgv(profiles: string[]): Promise<string[]> {\n const definitions = await this.getDefinitions()\n if (profiles.length === 0 && doesHaveValue(definitions.default)) {\n profiles = ['default']\n }\n const argvs = profiles.map((profile) => {\n if (doesNotHaveValue(definitions[profile])) {\n throw new Error(`Undefined profile: ${profile}`)\n }\n return stringArgv(definitions[profile])\n })\n return _.flatten(argvs)\n }\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"publish_banner.js","sourceRoot":"","sources":["../../src/cli/publish_banner.ts"],"names":[],"mappings":";;;;;AAAA,uDAAgC;AAChC,4DAA8B;AAE9B,MAAM,iBAAiB,GAAG,CAAC,CAAS,EAAU,EAAE,CAC9C,cAAM,CAAC,SAAS,CAAC,cAAM,CAAC,IAAI,CAAC,cAAM,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA;AAE/C,MAAM,kBAAkB,GAAG,iBAAiB,CAAC,6BAA6B,CAAC,CAAA;AAC3E,MAAM,YAAY,GAChB,cAAM,CAAC,IAAI,CAAC,0BAA0B,CAAC,GAAG,GAAG,GAAG,cAAM,CAAC,IAAI,CAAC,MAAM,CAAC,CAAA;AACrE,MAAM,oBAAoB,GAAG,iBAAiB,CAC5C,8CAA8C,CAC/C,CAAA;AAED,MAAM,IAAI,GAAG;+CACkC,kBAAkB;;0BAEvC,cAAM,CAAC,IAAI,CAAC,WAAW,CAAC;0BACxB,YAAY;;sBAEhB,oBAAoB;;4CAEE,cAAM,CAAC,IAAI,CAAC,eAAe,CAAC;EACtE,cAAM,CAAC,IAAI,CAAC,iDAAiD,CAAC,EAAE,CAAA;AAElE,MAAM,KAAK,GAAG,IAAI,oBAAK,CAAC;IACtB,KAAK,EAAE;QACL,IAAI,EAAE,EAAE;QACR,MAAM,EAAE,CAAC,OAAO,CAAC;KAClB;CACF,CAAC,CAAA;AAEF,KAAK,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,CAAC,CAAA;AAElB,kBAAe,KAAK,CAAC,QAAQ,EAAE,CAAA"}
|
|
1
|
+
{"version":3,"file":"publish_banner.js","sourceRoot":"","sources":["../../src/cli/publish_banner.ts"],"names":[],"mappings":";;;;;AAAA,uDAAgC;AAChC,4DAA8B;AAE9B,MAAM,iBAAiB,GAAG,CAAC,CAAS,EAAU,EAAE,CAC9C,cAAM,CAAC,SAAS,CAAC,cAAM,CAAC,IAAI,CAAC,cAAM,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA;AAE/C,MAAM,kBAAkB,GAAG,iBAAiB,CAAC,6BAA6B,CAAC,CAAA;AAC3E,MAAM,YAAY,GAChB,cAAM,CAAC,IAAI,CAAC,0BAA0B,CAAC,GAAG,GAAG,GAAG,cAAM,CAAC,IAAI,CAAC,MAAM,CAAC,CAAA;AACrE,MAAM,oBAAoB,GAAG,iBAAiB,CAC5C,8CAA8C,CAC/C,CAAA;AAED,MAAM,IAAI,GAAG;+CACkC,kBAAkB;;0BAEvC,cAAM,CAAC,IAAI,CAAC,WAAW,CAAC;0BACxB,YAAY;;sBAEhB,oBAAoB;;4CAEE,cAAM,CAAC,IAAI,CAAC,eAAe,CAAC;EACtE,cAAM,CAAC,IAAI,CAAC,iDAAiD,CAAC,EAAE,CAAA;AAElE,MAAM,KAAK,GAAG,IAAI,oBAAK,CAAC;IACtB,KAAK,EAAE;QACL,IAAI,EAAE,EAAE;QACR,MAAM,EAAE,CAAC,OAAO,CAAC;KAClB;CACF,CAAC,CAAA;AAEF,KAAK,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,CAAC,CAAA;AAElB,kBAAe,KAAK,CAAC,QAAQ,EAAE,CAAA","sourcesContent":["import colors from 'colors/safe'\nimport Table from 'cli-table3'\n\nconst underlineBoldCyan = (x: string): string =>\n colors.underline(colors.bold(colors.cyan(x)))\n\nconst formattedReportUrl = underlineBoldCyan('https://reports.cucumber.io')\nconst formattedEnv =\n colors.cyan('CUCUMBER_PUBLISH_ENABLED') + '=' + colors.cyan('true')\nconst formattedMoreInfoUrl = underlineBoldCyan(\n 'https://reports.cucumber.io/docs/cucumber-js'\n)\n\nconst text = `\\\nShare your Cucumber Report with your team at ${formattedReportUrl}\n\nCommand line option: ${colors.cyan('--publish')}\nEnvironment variable: ${formattedEnv}\n\nMore information at ${formattedMoreInfoUrl}\n\nTo disable this message, add this to your ${colors.bold('./cucumber.js')}: \n${colors.bold(\"module.exports = { default: '--publish-quiet' }\")}`\n\nconst table = new Table({\n style: {\n head: [],\n border: ['green'],\n },\n})\n\ntable.push([text])\n\nexport default table.toString()\n"]}
|
package/lib/cli/run.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"run.js","sourceRoot":"","sources":["../../src/cli/run.ts"],"names":[],"mappings":";;;;;AAAA,0CAAuC;AACvC,oDAA2B;AAC3B,sEAA4C;AAE5C,SAAS,aAAa,CAAC,KAAY;IACjC,OAAO,CAAC,KAAK,CAAC,gBAAM,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC,CAAA,CAAC,iCAAiC;IACxE,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAA;AACjB,CAAC;AAED,SAAS,iCAAiC;IACxC,OAAO,CAAC,KAAK,CAAC,wBAAa,CAAC,CAAA;AAC9B,CAAC;AAEc,KAAK,UAAU,GAAG;IAC/B,MAAM,GAAG,GAAG,OAAO,CAAC,GAAG,EAAE,CAAA;IACzB,MAAM,GAAG,GAAG,IAAI,UAAG,CAAC;QAClB,IAAI,EAAE,OAAO,CAAC,IAAI;QAClB,GAAG;QACH,MAAM,EAAE,OAAO,CAAC,MAAM;KACvB,CAAC,CAAA;IAEF,IAAI,MAAqB,CAAA;IACzB,IAAI;QACF,MAAM,GAAG,MAAM,GAAG,CAAC,GAAG,EAAE,CAAA;KACzB;IAAC,OAAO,KAAK,EAAE;QACd,aAAa,CAAC,KAAK,CAAC,CAAA;KACrB;IAED,MAAM,MAAM,GAAG,MAAM,GAAG,CAAC,gBAAgB,EAAE,CAAA;IAC3C,IAAI,CAAC,MAAM,CAAC,UAAU,IAAI,CAAC,MAAM,CAAC,4BAA4B,EAAE;QA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,EAAE,CAAA;KACpC;IAED,MAAM,QAAQ,GAAG,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA;IACvC,IAAI,MAAM,CAAC,qBAAqB,EAAE;QAChC,OAAO,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAA;KACvB;SAAM;QACL,OAAO,CAAC,QAAQ,GAAG,QAAQ,CAAA;KAC5B;AACH,CAAC;AA1BD,sBA0BC","sourcesContent":["import Cli, { ICliRunResult } from './'\nimport VError from 'verror'\nimport publishBanner from './publish_banner'\n\nfunction exitWithError(error: Error): void {\n console.error(VError.fullStack(error)) // eslint-disable-line no-console\n process.exit(1)\n}\n\nfunction displayPublishAdvertisementBanner(): void {\n console.error(publishBanner)\n}\n\nexport default async function run(): Promise<void> {\n const cwd = process.cwd()\n const cli = new Cli({\n argv: process.argv,\n cwd,\n stdout: process.stdout,\n })\n\n let result: ICliRunResult\n try {\n result = await cli.run()\n } catch (error) {\n exitWithError(error)\n }\n\n const config = await cli.getConfiguration()\n if (!config.publishing && !config.suppressPublishAdvertisement) {\n displayPublishAdvertisementBanner()\n }\n\n const exitCode = result.success ? 0 : 1\n if (result.shouldExitImmediately) {\n process.exit(exitCode)\n } else {\n process.exitCode = exitCode\n }\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"builder.js","sourceRoot":"","sources":["../../src/formatter/builder.ts"],"names":[],"mappings":";;;;;AAAA,oEAAyC;AACzC,4HAAiG;AACjG,sEAA4C;AAC5C,4EAAkD;AAClD,gDAAuB;AACvB,sFAA2D;AAC3D,8EAAoD;AACpD,wEAA8C;AAC9C,8EAAoD;AACpD,wGAA4E;AAC5E,4EAAkD;AAClD,wEAA8C;AAC9C,kFAAuD;AAGvD,oDAAkE;AAKlE,qFAAmF;AACnF,sEAA4C;AAC5C,oEAA0C;AAoB1C,MAAM,gBAAgB,GAAG;IACvB,KAAK,CAAC,IAAY,EAAE,OAAsB;QACx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EAChB,aAAa,EACb,kBAAkB,GACsB;QACxC,IAAI,gCAAgB,CAAC,gBAAgB,CAAC,EAAE;YACtC,gBAAgB,GAAG,iCAAgB,CAAC,WAAW,CAAA;SAChD;QACD,IAAI,MAAM,GAAG,mCAAuB,CAAA;QACpC,IAAI,6BAAa,CAAC,aAAa,CAAC,EAAE;YAChC,MAAM,cAAc,GAAG,cAAI,CAAC,OAAO,CAAC,GAAG,EAAE,aAAa,CAAC,CAAA;YACvD,MAAM,GAAG,OAAO,CAAC,cAAc,CAAC,CAAA,CAAC,yDAAyD;SAC3F;QACD,OAAO,IAAI,yCAA4B,CAAC;YACtC,aAAa,EAAE,IAAI,MAAM,CAAC,gBAAgB,CAAC;YAC3C,qBAAqB,EAAE,kBAAkB,CAAC,qBAAqB;SAChE,CAAC,CAAA;IACJ,CAAC;IAED,mBAAmB,CAAC,mBAA2B,EAAE,GAAW;QAC1D,MAAM,eAAe,GAAG,wBAAa,CAAC,GAAG,CAAC,CAAC,mBAAmB,CAAC,CAAA;QAE/D,IAAI,OAAO,eAAe,KAAK,UAAU,EAAE;YACzC,OAAO,eAAe,CAAA;SACvB;aAAM,IACL,6BAAa,CAAC,eAAe,CAAC;YAC9B,OAAO,eAAe,CAAC,OAAO,KAAK,UAAU,EAC7C;YACA,OAAO,eAAe,CAAC,OAAO,CAAA;SAC/B;QACD,MAAM,IAAI,KAAK,CACb,qBAAqB,mBAAmB,8BAA8B,CACvE,CAAA;IACH,CAAC;CACF,CAAA;AAED,kBAAe,gBAAgB,CAAA","sourcesContent":["import getColorFns from './get_color_fns'\nimport JavascriptSnippetSyntax from './step_definition_snippet_builder/javascript_snippet_syntax'\nimport JsonFormatter from './json_formatter'\nimport MessageFormatter from './message_formatter'\nimport path from 'path'\nimport ProgressBarFormatter from './progress_bar_formatter'\nimport ProgressFormatter from './progress_formatter'\nimport RerunFormatter from './rerun_formatter'\nimport SnippetsFormatter from './snippets_formatter'\nimport StepDefinitionSnippetBuilder from './step_definition_snippet_builder'\nimport SummaryFormatter from './summary_formatter'\nimport UsageFormatter from './usage_formatter'\nimport UsageJsonFormatter from './usage_json_formatter'\nimport { ISupportCodeLibrary } from '../support_code_library_builder/types'\nimport Formatter, { IFormatterCleanupFn, IFormatterLogFn } from '.'\nimport { doesHaveValue, doesNotHaveValue } from '../value_checker'\nimport { EventEmitter } from 'events'\nimport EventDataCollector from './helpers/event_data_collector'\nimport { Writable as WritableStream } from 'stream'\nimport { IParsedArgvFormatOptions } from '../cli/argv_parser'\nimport { SnippetInterface } from './step_definition_snippet_builder/snippet_syntax'\nimport HtmlFormatter from './html_formatter'\nimport createRequire from 'create-require'\n\ninterface IGetStepDefinitionSnippetBuilderOptions {\n cwd: string\n snippetInterface?: SnippetInterface\n snippetSyntax?: string\n supportCodeLibrary: ISupportCodeLibrary\n}\n\nexport interface IBuildOptions {\n cwd: string\n eventBroadcaster: EventEmitter\n eventDataCollector: EventDataCollector\n log: IFormatterLogFn\n parsedArgvOptions: IParsedArgvFormatOptions\n stream: WritableStream\n cleanup: IFormatterCleanupFn\n supportCodeLibrary: ISupportCodeLibrary\n}\n\nconst FormatterBuilder = {\n build(type: string, options: IBuildOptions): Formatter {\n const FormatterConstructor = FormatterBuilder.getConstructorByType(\n type,\n options.cwd\n )\n const colorFns = getColorFns(options.parsedArgvOptions.colorsEnabled)\n const snippetBuilder = FormatterBuilder.getStepDefinitionSnippetBuilder({\n cwd: options.cwd,\n snippetInterface: options.parsedArgvOptions.snippetInterface,\n snippetSyntax: options.parsedArgvOptions.snippetSyntax,\n supportCodeLibrary: options.supportCodeLibrary,\n })\n return new FormatterConstructor({\n colorFns,\n snippetBuilder,\n ...options,\n })\n },\n\n getConstructorByType(type: string, cwd: string): typeof Formatter {\n switch (type) {\n case 'json':\n return JsonFormatter\n case 'message':\n return MessageFormatter\n case 'html':\n return HtmlFormatter\n case 'progress':\n return ProgressFormatter\n case 'progress-bar':\n return ProgressBarFormatter\n case 'rerun':\n return RerunFormatter\n case 'snippets':\n return SnippetsFormatter\n case 'summary':\n return SummaryFormatter\n case 'usage':\n return UsageFormatter\n case 'usage-json':\n return UsageJsonFormatter\n default:\n return FormatterBuilder.loadCustomFormatter(type, cwd)\n }\n },\n\n getStepDefinitionSnippetBuilder({\n cwd,\n snippetInterface,\n snippetSyntax,\n supportCodeLibrary,\n }: IGetStepDefinitionSnippetBuilderOptions) {\n if (doesNotHaveValue(snippetInterface)) {\n snippetInterface = SnippetInterface.Synchronous\n }\n let Syntax = JavascriptSnippetSyntax\n if (doesHaveValue(snippetSyntax)) {\n const fullSyntaxPath = path.resolve(cwd, snippetSyntax)\n Syntax = require(fullSyntaxPath) // eslint-disable-line @typescript-eslint/no-var-requires\n }\n return new StepDefinitionSnippetBuilder({\n snippetSyntax: new Syntax(snippetInterface),\n parameterTypeRegistry: supportCodeLibrary.parameterTypeRegistry,\n })\n },\n\n loadCustomFormatter(customFormatterPath: string, cwd: string) {\n const CustomFormatter = createRequire(cwd)(customFormatterPath)\n\n if (typeof CustomFormatter === 'function') {\n return CustomFormatter\n } else if (\n doesHaveValue(CustomFormatter) &&\n typeof CustomFormatter.default === 'function'\n ) {\n return CustomFormatter.default\n }\n throw new Error(\n `Custom formatter (${customFormatterPath}) does not export a function`\n )\n },\n}\n\nexport default FormatterBuilder\n"]}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { TestStepResultStatus } from '@cucumber/messages';
|
|
2
2
|
export declare type IColorFn = (text: string) => string;
|
|
3
3
|
export interface IColorFns {
|
|
4
|
-
forStatus: (status:
|
|
4
|
+
forStatus: (status: TestStepResultStatus) => IColorFn;
|
|
5
5
|
location: IColorFn;
|
|
6
6
|
tag: IColorFn;
|
|
7
7
|
}
|
|
@@ -5,20 +5,19 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
const lodash_1 = __importDefault(require("lodash"));
|
|
7
7
|
const safe_1 = __importDefault(require("colors/safe"));
|
|
8
|
-
const status_1 = __importDefault(require("../status"));
|
|
9
8
|
safe_1.default.enable();
|
|
10
9
|
function getColorFns(enabled) {
|
|
11
10
|
if (enabled) {
|
|
12
11
|
return {
|
|
13
12
|
forStatus(status) {
|
|
14
13
|
return {
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
14
|
+
AMBIGUOUS: safe_1.default.red.bind(safe_1.default),
|
|
15
|
+
FAILED: safe_1.default.red.bind(safe_1.default),
|
|
16
|
+
PASSED: safe_1.default.green.bind(safe_1.default),
|
|
17
|
+
PENDING: safe_1.default.yellow.bind(safe_1.default),
|
|
18
|
+
SKIPPED: safe_1.default.cyan.bind(safe_1.default),
|
|
19
|
+
UNDEFINED: safe_1.default.yellow.bind(safe_1.default),
|
|
20
|
+
UNKNOWN: safe_1.default.yellow.bind(safe_1.default),
|
|
22
21
|
}[status];
|
|
23
22
|
},
|
|
24
23
|
location: safe_1.default.gray.bind(safe_1.default),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get_color_fns.js","sourceRoot":"","sources":["../../src/formatter/get_color_fns.ts"],"names":[],"mappings":";;;;;AAAA,oDAAsB;AACtB,uDAAgC;
|
|
1
|
+
{"version":3,"file":"get_color_fns.js","sourceRoot":"","sources":["../../src/formatter/get_color_fns.ts"],"names":[],"mappings":";;;;;AAAA,oDAAsB;AACtB,uDAAgC;AAGhC,cAAM,CAAC,MAAM,EAAE,CAAA;AAUf,SAAwB,WAAW,CAAC,OAAgB;IAClD,IAAI,OAAO,EAAE;QACX,OAAO;YACL,SAAS,CAAC,MAA4B;gBACpC,OAAO;oBACL,SAAS,EAAE,cAAM,CAAC,GAAG,CAAC,IAAI,CAAC,cAAM,CAAC;oBAClC,MAAM,EAAE,cAAM,CAAC,GAAG,CAAC,IAAI,CAAC,cAAM,CAAC;oBAC/B,MAAM,EAAE,cAAM,CAAC,KAAK,CAAC,IAAI,CAAC,cAAM,CAAC;oBACjC,OAAO,EAAE,cAAM,CAAC,MAAM,CAAC,IAAI,CAAC,cAAM,CAAC;oBACnC,OAAO,EAAE,cAAM,CAAC,IAAI,CAAC,IAAI,CAAC,cAAM,CAAC;oBACjC,SAAS,EAAE,cAAM,CAAC,MAAM,CAAC,IAAI,CAAC,cAAM,CAAC;oBACrC,OAAO,EAAE,cAAM,CAAC,MAAM,CAAC,IAAI,CAAC,cAAM,CAAC;iBACpC,CAAC,MAAM,CAAC,CAAA;YACX,CAAC;YACD,QAAQ,EAAE,cAAM,CAAC,IAAI,CAAC,IAAI,CAAC,cAAM,CAAC;YAClC,GAAG,EAAE,cAAM,CAAC,IAAI,CAAC,IAAI,CAAC,cAAM,CAAC;SAC9B,CAAA;KACF;SAAM;QACL,OAAO;YACL,SAAS,CAAC,MAA4B;gBACpC,OAAO,gBAAC,CAAC,QAAQ,CAAA;YACnB,CAAC;YACD,QAAQ,EAAE,gBAAC,CAAC,QAAQ;YACpB,GAAG,EAAE,gBAAC,CAAC,QAAQ;SAChB,CAAA;KACF;AACH,CAAC;AA1BD,8BA0BC","sourcesContent":["import _ from 'lodash'\nimport colors from 'colors/safe'\nimport { TestStepResultStatus } from '@cucumber/messages'\n\ncolors.enable()\n\nexport type IColorFn = (text: string) => string\n\nexport interface IColorFns {\n forStatus: (status: TestStepResultStatus) => IColorFn\n location: IColorFn\n tag: IColorFn\n}\n\nexport default function getColorFns(enabled: boolean): IColorFns {\n if (enabled) {\n return {\n forStatus(status: TestStepResultStatus) {\n return {\n AMBIGUOUS: colors.red.bind(colors),\n FAILED: colors.red.bind(colors),\n PASSED: colors.green.bind(colors),\n PENDING: colors.yellow.bind(colors),\n SKIPPED: colors.cyan.bind(colors),\n UNDEFINED: colors.yellow.bind(colors),\n UNKNOWN: colors.yellow.bind(colors),\n }[status]\n },\n location: colors.gray.bind(colors),\n tag: colors.cyan.bind(colors),\n }\n } else {\n return {\n forStatus(status: TestStepResultStatus) {\n return _.identity\n },\n location: _.identity,\n tag: _.identity,\n }\n }\n}\n"]}
|
|
@@ -1,32 +1,29 @@
|
|
|
1
1
|
/// <reference types="node" />
|
|
2
|
-
import
|
|
3
|
-
import { messages } from '@cucumber/messages';
|
|
2
|
+
import * as messages from '@cucumber/messages';
|
|
4
3
|
import { EventEmitter } from 'events';
|
|
5
|
-
import { Query } from '@cucumber/query';
|
|
6
4
|
export interface ITestCaseAttempt {
|
|
7
5
|
attempt: number;
|
|
8
|
-
gherkinDocument: messages.
|
|
9
|
-
pickle: messages.
|
|
10
|
-
stepAttachments:
|
|
11
|
-
stepResults:
|
|
12
|
-
testCase: messages.
|
|
13
|
-
worstTestStepResult: messages.
|
|
6
|
+
gherkinDocument: messages.GherkinDocument;
|
|
7
|
+
pickle: messages.Pickle;
|
|
8
|
+
stepAttachments: Record<string, messages.Attachment[]>;
|
|
9
|
+
stepResults: Record<string, messages.TestStepResult>;
|
|
10
|
+
testCase: messages.TestCase;
|
|
11
|
+
worstTestStepResult: messages.TestStepResult;
|
|
14
12
|
}
|
|
15
13
|
export default class EventDataCollector {
|
|
16
14
|
private gherkinDocumentMap;
|
|
17
15
|
private pickleMap;
|
|
18
16
|
private testCaseMap;
|
|
19
17
|
private testCaseAttemptDataMap;
|
|
20
|
-
readonly undefinedParameterTypes: messages.
|
|
21
|
-
readonly query: Query;
|
|
18
|
+
readonly undefinedParameterTypes: messages.UndefinedParameterType[];
|
|
22
19
|
constructor(eventBroadcaster: EventEmitter);
|
|
23
|
-
getGherkinDocument(uri: string): messages.
|
|
24
|
-
getPickle(pickleId: string): messages.
|
|
20
|
+
getGherkinDocument(uri: string): messages.GherkinDocument;
|
|
21
|
+
getPickle(pickleId: string): messages.Pickle;
|
|
25
22
|
getTestCaseAttempts(): ITestCaseAttempt[];
|
|
26
23
|
getTestCaseAttempt(testCaseStartedId: string): ITestCaseAttempt;
|
|
27
24
|
parseEnvelope(envelope: messages.Envelope): void;
|
|
28
|
-
initTestCaseAttempt
|
|
29
|
-
storeAttachment(
|
|
30
|
-
storeTestStepResult({ testCaseStartedId, testStepId, testStepResult, }: messages.
|
|
31
|
-
storeTestCaseResult({ testCaseStartedId }: messages.
|
|
25
|
+
private initTestCaseAttempt;
|
|
26
|
+
storeAttachment(attachment: messages.Attachment): void;
|
|
27
|
+
storeTestStepResult({ testCaseStartedId, testStepId, testStepResult, }: messages.TestStepFinished): void;
|
|
28
|
+
storeTestCaseResult({ testCaseStartedId }: messages.TestCaseFinished): void;
|
|
32
29
|
}
|
|
@@ -20,8 +20,8 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
20
20
|
};
|
|
21
21
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
22
22
|
const lodash_1 = __importStar(require("lodash"));
|
|
23
|
+
const messages = __importStar(require("@cucumber/messages"));
|
|
23
24
|
const value_checker_1 = require("../../value_checker");
|
|
24
|
-
const query_1 = require("@cucumber/query");
|
|
25
25
|
class EventDataCollector {
|
|
26
26
|
constructor(eventBroadcaster) {
|
|
27
27
|
this.gherkinDocumentMap = {};
|
|
@@ -29,7 +29,6 @@ class EventDataCollector {
|
|
|
29
29
|
this.testCaseMap = {};
|
|
30
30
|
this.testCaseAttemptDataMap = {};
|
|
31
31
|
this.undefinedParameterTypes = [];
|
|
32
|
-
this.query = new query_1.Query();
|
|
33
32
|
eventBroadcaster.on('envelope', this.parseEnvelope.bind(this));
|
|
34
33
|
}
|
|
35
34
|
getGherkinDocument(uri) {
|
|
@@ -58,7 +57,6 @@ class EventDataCollector {
|
|
|
58
57
|
};
|
|
59
58
|
}
|
|
60
59
|
parseEnvelope(envelope) {
|
|
61
|
-
this.query.update(envelope);
|
|
62
60
|
if (value_checker_1.doesHaveValue(envelope.gherkinDocument)) {
|
|
63
61
|
this.gherkinDocumentMap[envelope.gherkinDocument.uri] =
|
|
64
62
|
envelope.gherkinDocument;
|
|
@@ -91,24 +89,32 @@ class EventDataCollector {
|
|
|
91
89
|
testCaseId: testCaseStarted.testCaseId,
|
|
92
90
|
stepAttachments: {},
|
|
93
91
|
stepResults: {},
|
|
94
|
-
worstTestStepResult: {
|
|
92
|
+
worstTestStepResult: {
|
|
93
|
+
willBeRetried: false,
|
|
94
|
+
duration: { seconds: 0, nanos: 0 },
|
|
95
|
+
status: messages.TestStepResultStatus.UNKNOWN,
|
|
96
|
+
},
|
|
95
97
|
};
|
|
96
98
|
}
|
|
97
|
-
storeAttachment(
|
|
99
|
+
storeAttachment(attachment) {
|
|
100
|
+
const { testCaseStartedId, testStepId } = attachment;
|
|
101
|
+
// TODO: we shouldn't have to check if these properties have values - they are non-nullable
|
|
98
102
|
if (value_checker_1.doesHaveValue(testCaseStartedId) && value_checker_1.doesHaveValue(testStepId)) {
|
|
99
103
|
const { stepAttachments } = this.testCaseAttemptDataMap[testCaseStartedId];
|
|
100
104
|
if (value_checker_1.doesNotHaveValue(stepAttachments[testStepId])) {
|
|
101
105
|
stepAttachments[testStepId] = [];
|
|
102
106
|
}
|
|
103
|
-
stepAttachments[testStepId].push(
|
|
107
|
+
stepAttachments[testStepId].push(attachment);
|
|
104
108
|
}
|
|
105
109
|
}
|
|
106
110
|
storeTestStepResult({ testCaseStartedId, testStepId, testStepResult, }) {
|
|
107
|
-
this.testCaseAttemptDataMap[testCaseStartedId].stepResults[testStepId] =
|
|
111
|
+
this.testCaseAttemptDataMap[testCaseStartedId].stepResults[testStepId] =
|
|
112
|
+
testStepResult;
|
|
108
113
|
}
|
|
109
114
|
storeTestCaseResult({ testCaseStartedId }) {
|
|
110
115
|
const stepResults = lodash_1.values(this.testCaseAttemptDataMap[testCaseStartedId].stepResults);
|
|
111
|
-
this.testCaseAttemptDataMap[testCaseStartedId].worstTestStepResult =
|
|
116
|
+
this.testCaseAttemptDataMap[testCaseStartedId].worstTestStepResult =
|
|
117
|
+
messages.getWorstTestStepResult(stepResults);
|
|
112
118
|
}
|
|
113
119
|
}
|
|
114
120
|
exports.default = EventDataCollector;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"event_data_collector.js","sourceRoot":"","sources":["../../../src/formatter/helpers/event_data_collector.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA,
|
|
1
|
+
{"version":3,"file":"event_data_collector.js","sourceRoot":"","sources":["../../../src/formatter/helpers/event_data_collector.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA,iDAAkC;AAClC,6DAA8C;AAC9C,uDAAqE;AAqBrE,MAAqB,kBAAkB;IAOrC,YAAY,gBAA8B;QANlC,uBAAkB,GAA6C,EAAE,CAAA;QACjE,cAAS,GAAoC,EAAE,CAAA;QAC/C,gBAAW,GAAsC,EAAE,CAAA;QACnD,2BAAsB,GAAyC,EAAE,CAAA;QAChE,4BAAuB,GAAsC,EAAE,CAAA;QAGtE,gBAAgB,CAAC,EAAE,CAAC,UAAU,EAAE,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAA;IAChE,CAAC;IAED,kBAAkB,CAAC,GAAW;QAC5B,OAAO,IAAI,CAAC,kBAAkB,CAAC,GAAG,CAAC,CAAA;IACrC,CAAC;IAED,SAAS,CAAC,QAAgB;QACxB,OAAO,IAAI,CAAC,SAAS,CAAC,QAAQ,CAAC,CAAA;IACjC,CAAC;IAED,mBAAmB;QACjB,OAAO,gBAAC,CAAC,IAAI,CAAC,IAAI,CAAC,sBAAsB,CAAC,CAAC,GAAG,CAAC,CAAC,iBAAiB,EAAE,EAAE;YACnE,OAAO,IAAI,CAAC,kBAAkB,CAAC,iBAAiB,CAAC,CAAA;QACnD,CAAC,CAAC,CAAA;IACJ,CAAC;IAED,kBAAkB,CAAC,iBAAyB;QAC1C,MAAM,mBAAmB,GAAG,IAAI,CAAC,sBAAsB,CAAC,iBAAiB,CAAC,CAAA;QAC1E,MAAM,QAAQ,GAAG,IAAI,CAAC,WAAW,CAAC,mBAAmB,CAAC,UAAU,CAAC,CAAA;QACjE,MAAM,MAAM,GAAG,IAAI,CAAC,SA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AAI,CAAC,sBAAsB,CAAC,iBAAiB,CAAC,CAAC,WAAW,CAAC,UAAU,CAAC;YACpE,cAAc,CAAA;IAClB,CAAC;IAED,mBAAmB,CAAC,EAAE,iBAAiB,EAA6B;QAClE,MAAM,WAAW,GAAG,eAAM,CACxB,IAAI,CAAC,sBAAsB,CAAC,iBAAiB,CAAC,CAAC,WAAW,CAC3D,CAAA;QACD,IAAI,CAAC,sBAAsB,CAAC,iBAAiB,CAAC,CAAC,mBAAmB;YAChE,QAAQ,CAAC,sBAAsB,CAAC,WAAW,CAAC,CAAA;IAChD,CAAC;CACF;AAvGD,qCAuGC","sourcesContent":["import _, { values } from 'lodash'\nimport * as messages from '@cucumber/messages'\nimport { doesHaveValue, doesNotHaveValue } from '../../value_checker'\nimport { EventEmitter } from 'events'\n\ninterface ITestCaseAttemptData {\n attempt: number\n testCaseId: string\n stepAttachments: Record<string, messages.Attachment[]>\n stepResults: Record<string, messages.TestStepResult>\n worstTestStepResult: messages.TestStepResult\n}\n\nexport interface ITestCaseAttempt {\n attempt: number\n gherkinDocument: messages.GherkinDocument\n pickle: messages.Pickle\n stepAttachments: Record<string, messages.Attachment[]>\n stepResults: Record<string, messages.TestStepResult>\n testCase: messages.TestCase\n worstTestStepResult: messages.TestStepResult\n}\n\nexport default class EventDataCollector {\n private gherkinDocumentMap: Record<string, messages.GherkinDocument> = {}\n private pickleMap: Record<string, messages.Pickle> = {}\n private testCaseMap: Record<string, messages.TestCase> = {}\n private testCaseAttemptDataMap: Record<string, ITestCaseAttemptData> = {}\n readonly undefinedParameterTypes: messages.UndefinedParameterType[] = []\n\n constructor(eventBroadcaster: EventEmitter) {\n eventBroadcaster.on('envelope', this.parseEnvelope.bind(this))\n }\n\n getGherkinDocument(uri: string): messages.GherkinDocument {\n return this.gherkinDocumentMap[uri]\n }\n\n getPickle(pickleId: string): messages.Pickle {\n return this.pickleMap[pickleId]\n }\n\n getTestCaseAttempts(): ITestCaseAttempt[] {\n return _.keys(this.testCaseAttemptDataMap).map((testCaseStartedId) => {\n return this.getTestCaseAttempt(testCaseStartedId)\n })\n }\n\n getTestCaseAttempt(testCaseStartedId: string): ITestCaseAttempt {\n const testCaseAttemptData = this.testCaseAttemptDataMap[testCaseStartedId]\n const testCase = this.testCaseMap[testCaseAttemptData.testCaseId]\n const pickle = this.pickleMap[testCase.pickleId]\n return {\n gherkinDocument: this.gherkinDocumentMap[pickle.uri],\n pickle,\n testCase,\n attempt: testCaseAttemptData.attempt,\n stepAttachments: testCaseAttemptData.stepAttachments,\n stepResults: testCaseAttemptData.stepResults,\n worstTestStepResult: testCaseAttemptData.worstTestStepResult,\n }\n }\n\n parseEnvelope(envelope: messages.Envelope): void {\n if (doesHaveValue(envelope.gherkinDocument)) {\n this.gherkinDocumentMap[envelope.gherkinDocument.uri] =\n envelope.gherkinDocument\n } else if (doesHaveValue(envelope.pickle)) {\n this.pickleMap[envelope.pickle.id] = envelope.pickle\n } else if (doesHaveValue(envelope.undefinedParameterType)) {\n this.undefinedParameterTypes.push(envelope.undefinedParameterType)\n } else if (doesHaveValue(envelope.testCase)) {\n this.testCaseMap[envelope.testCase.id] = envelope.testCase\n } else if (doesHaveValue(envelope.testCaseStarted)) {\n this.initTestCaseAttempt(envelope.testCaseStarted)\n } else if (doesHaveValue(envelope.attachment)) {\n this.storeAttachment(envelope.attachment)\n } else if (doesHaveValue(envelope.testStepFinished)) {\n this.storeTestStepResult(envelope.testStepFinished)\n } else if (doesHaveValue(envelope.testCaseFinished)) {\n this.storeTestCaseResult(envelope.testCaseFinished)\n }\n }\n\n private initTestCaseAttempt(testCaseStarted: messages.TestCaseStarted): void {\n this.testCaseAttemptDataMap[testCaseStarted.id] = {\n attempt: testCaseStarted.attempt,\n testCaseId: testCaseStarted.testCaseId,\n stepAttachments: {},\n stepResults: {},\n worstTestStepResult: {\n willBeRetried: false,\n duration: { seconds: 0, nanos: 0 },\n status: messages.TestStepResultStatus.UNKNOWN,\n },\n }\n }\n\n storeAttachment(attachment: messages.Attachment): void {\n const { testCaseStartedId, testStepId } = attachment\n // TODO: we shouldn't have to check if these properties have values - they are non-nullable\n if (doesHaveValue(testCaseStartedId) && doesHaveValue(testStepId)) {\n const { stepAttachments } = this.testCaseAttemptDataMap[testCaseStartedId]\n if (doesNotHaveValue(stepAttachments[testStepId])) {\n stepAttachments[testStepId] = []\n }\n stepAttachments[testStepId].push(attachment)\n }\n }\n\n storeTestStepResult({\n testCaseStartedId,\n testStepId,\n testStepResult,\n }: messages.TestStepFinished): void {\n this.testCaseAttemptDataMap[testCaseStartedId].stepResults[testStepId] =\n testStepResult\n }\n\n storeTestCaseResult({ testCaseStartedId }: messages.TestCaseFinished): void {\n const stepResults = values(\n this.testCaseAttemptDataMap[testCaseStartedId].stepResults\n )\n this.testCaseAttemptDataMap[testCaseStartedId].worstTestStepResult =\n messages.getWorstTestStepResult(stepResults)\n }\n}\n"]}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
export declare function
|
|
4
|
-
export declare function
|
|
5
|
-
export declare function
|
|
6
|
-
export declare function getGherkinScenarioLocationMap(gherkinDocument: messages.IGherkinDocument): Dictionary<messages.ILocation>;
|
|
1
|
+
import * as messages from '@cucumber/messages';
|
|
2
|
+
export declare function getGherkinStepMap(gherkinDocument: messages.GherkinDocument): Record<string, messages.Step>;
|
|
3
|
+
export declare function getGherkinScenarioMap(gherkinDocument: messages.GherkinDocument): Record<string, messages.Scenario>;
|
|
4
|
+
export declare function getGherkinExampleRuleMap(gherkinDocument: messages.GherkinDocument): Record<string, messages.Rule>;
|
|
5
|
+
export declare function getGherkinScenarioLocationMap(gherkinDocument: messages.GherkinDocument): Record<string, messages.Location>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"gherkin_document_parser.js","sourceRoot":"","sources":["../../../src/formatter/helpers/gherkin_document_parser.ts"],"names":[],"mappings":";;;;;;AAAA,
|
|
1
|
+
{"version":3,"file":"gherkin_document_parser.js","sourceRo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CAAC,QAAQ,CAAC;iBACvB,GAAG,CAAC,WAAW,CAAC;iBAChB,OAAO,EAAE;iBACT,OAAO,CAAC,CAAC,QAAQ,EAAE,EAAE;gBACpB,WAAW,CAAC,QAAQ,CAAC,EAAE,CAAC,GAAG,QAAQ,CAAC,QAAQ,CAAA;YAC9C,CAAC,CAAC;iBACD,KAAK,EAAE,CAAA;SACX;IACH,CAAC,CAAC,CAAA;IACF,OAAO,WAAW,CAAA;AACpB,CAAC;AAnBD,sEAmBC","sourcesContent":["import _ from 'lodash'\nimport * as messages from '@cucumber/messages'\nimport { doesHaveValue } from '../../value_checker'\n\nexport function getGherkinStepMap(\n gherkinDocument: messages.GherkinDocument\n): Record<string, messages.Step> {\n return _.chain(gherkinDocument.feature.children)\n .map(extractStepContainers)\n .flatten()\n .map('steps')\n .flatten()\n .map((step: messages.Step) => [step.id, step])\n .fromPairs()\n .value()\n}\n\nfunction extractStepContainers(\n child: messages.FeatureChild\n): Array<messages.Scenario | messages.Background> {\n if (doesHaveValue(child.background)) {\n return [child.background]\n } else if (doesHaveValue(child.rule)) {\n return child.rule.children.map((ruleChild) =>\n doesHaveValue(ruleChild.background)\n ? ruleChild.background\n : ruleChild.scenario\n )\n }\n return [child.scenario]\n}\n\nexport function getGherkinScenarioMap(\n gherkinDocument: messages.GherkinDocument\n): Record<string, messages.Scenario> {\n return _.chain(gherkinDocument.feature.children)\n .map((child: messages.FeatureChild) => {\n if (doesHaveValue(child.rule)) {\n return child.rule.children\n }\n return [child]\n })\n .flatten()\n .filter('scenario')\n .map('scenario')\n .map((scenario: messages.Scenario) => [scenario.id, scenario])\n .fromPairs()\n .value()\n}\n\nexport function getGherkinExampleRuleMap(\n gherkinDocument: messages.GherkinDocument\n): Record<string, messages.Rule> {\n return _.chain(gherkinDocument.feature.children)\n .filter('rule')\n .map('rule')\n .map((rule) => {\n return rule.children\n .filter((child) => doesHaveValue(child.scenario))\n .map((child) => [child.scenario.id, rule])\n })\n .flatten()\n .fromPairs()\n .value()\n}\n\nexport function getGherkinScenarioLocationMap(\n gherkinDocument: messages.GherkinDocument\n): Record<string, messages.Location> {\n const locationMap: Record<string, messages.Location> = {}\n const scenarioMap: Record<string, messages.Scenario> =\n getGherkinScenarioMap(gherkinDocument)\n _.entries<messages.Scenario>(scenarioMap).forEach(([id, scenario]) => {\n locationMap[id] = scenario.location\n if (doesHaveValue(scenario.examples)) {\n _.chain(scenario.examples)\n .map('tableBody')\n .flatten()\n .forEach((tableRow) => {\n locationMap[tableRow.id] = tableRow.location\n })\n .value()\n }\n })\n return locationMap\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/formatter/helpers/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAAA,iFAAkE;AAUzD,sDAAqB;AAT9B,8DAA+C;AASf,oCAAY;AAP5C,uEAAiE;AAAxD,gIAAA,oBAAoB,OAAA;AAC7B,+DAAsE;AAA7D,2IAAA,OAAO,OAAsB;AACtC,+CAAgE;AAAvD,2GAAA,WAAW,OAAA;AAAE,kHAAA,kBAAkB,OAAA;AACxC,iDAA4E;AAAnE,4GAAA,WAAW,OAAA;AAAE,0GAAA,SAAS,OAAA;AAAE,0GAAA,SAAS,OAAA;AAAE,wGAAA,OAAO,OAAA;AACnD,uDAAmD;AAA1C,kHAAA,cAAc,OAAA;AACvB,qDAAiD;AAAxC,gHAAA,aAAa,OAAA;AACtB,iDAA0C;AAAjC,yGAAA,QAAQ,OAAA"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/formatter/helpers/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAAA,iFAAkE;AAUzD,sDAAqB;AAT9B,8DAA+C;AASf,oCAAY;AAP5C,uEAAiE;AAAxD,gIAAA,oBAAoB,OAAA;AAC7B,+DAAsE;AAA7D,2IAAA,OAAO,OAAsB;AACtC,+CAAgE;AAAvD,2GAAA,WAAW,OAAA;AAAE,kHAAA,kBAAkB,OAAA;AACxC,iDAA4E;AAAnE,4GAAA,WAAW,OAAA;AAAE,0GAAA,SAAS,OAAA;AAAE,0GAAA,SAAS,OAAA;AAAE,wGAAA,OAAO,OAAA;AACnD,uDAAmD;AAA1C,kHAAA,cAAc,OAAA;AACvB,qDAAiD;AAAxC,gHAAA,aAAa,OAAA;AACtB,iDAA0C;AAAjC,yGAAA,QAAQ,OAAA","sourcesContent":["import * as GherkinDocumentParser from './gherkin_document_parser'\nimport * as PickleParser from './pickle_parser'\n\nexport { parseTestCaseAttempt } from './test_case_attempt_parser'\nexport { default as EventDataCollector } from './event_data_collector'\nexport { KeywordType, getStepKeywordType } from './keyword_type'\nexport { formatIssue, isWarning, isFailure, isIssue } from './issue_helpers'\nexport { formatLocation } from './location_helpers'\nexport { formatSummary } from './summary_helpers'\nexport { getUsage } from './usage_helpers'\nexport { GherkinDocumentParser, PickleParser }\n"]}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import
|
|
1
|
+
import * as messages from '@cucumber/messages';
|
|
2
2
|
import { IColorFns } from '../get_color_fns';
|
|
3
3
|
import StepDefinitionSnippetBuilder from '../step_definition_snippet_builder';
|
|
4
4
|
import { ISupportCodeLibrary } from '../../support_code_library_builder/types';
|
|
5
5
|
import { ITestCaseAttempt } from './event_data_collector';
|
|
6
|
-
export declare function isFailure(result: messages.
|
|
7
|
-
export declare function isWarning(result: messages.
|
|
8
|
-
export declare function isIssue(result: messages.
|
|
6
|
+
export declare function isFailure(result: messages.TestStepResult): boolean;
|
|
7
|
+
export declare function isWarning(result: messages.TestStepResult): boolean;
|
|
8
|
+
export declare function isIssue(result: messages.TestStepResult): boolean;
|
|
9
9
|
export interface IFormatIssueRequest {
|
|
10
10
|
colorFns: IColorFns;
|
|
11
11
|
cwd: string;
|
|
@@ -15,5 +15,5 @@ export interface IFormatIssueRequest {
|
|
|
15
15
|
supportCodeLibrary: ISupportCodeLibrary;
|
|
16
16
|
}
|
|
17
17
|
export declare function formatIssue({ colorFns, cwd, number, snippetBuilder, testCaseAttempt, supportCodeLibrary, }: IFormatIssueRequest): string;
|
|
18
|
-
export declare function formatUndefinedParameterTypes(undefinedParameterTypes: messages.
|
|
19
|
-
export declare function formatUndefinedParameterType(parameterType: messages.
|
|
18
|
+
export declare function formatUndefinedParameterTypes(undefinedParameterTypes: messages.UndefinedParameterType[]): string;
|
|
19
|
+
export declare function formatUndefinedParameterType(parameterType: messages.UndefinedParameterType): string;
|
|
@@ -5,17 +5,16 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.formatUndefinedParameterType = exports.formatUndefinedParameterTypes = exports.formatIssue = exports.isIssue = exports.isWarning = exports.isFailure = void 0;
|
|
7
7
|
const indent_string_1 = __importDefault(require("indent-string"));
|
|
8
|
-
const status_1 = __importDefault(require("../../status"));
|
|
9
8
|
const test_case_attempt_formatter_1 = require("./test_case_attempt_formatter");
|
|
10
9
|
function isFailure(result) {
|
|
11
|
-
return (result.status ===
|
|
12
|
-
result.status ===
|
|
13
|
-
(result.status ===
|
|
10
|
+
return (result.status === 'AMBIGUOUS' ||
|
|
11
|
+
result.status === 'UNDEFINED' ||
|
|
12
|
+
(result.status === 'FAILED' && !result.willBeRetried));
|
|
14
13
|
}
|
|
15
14
|
exports.isFailure = isFailure;
|
|
16
15
|
function isWarning(result) {
|
|
17
|
-
return (result.status ===
|
|
18
|
-
(result.status ===
|
|
16
|
+
return (result.status === 'PENDING' ||
|
|
17
|
+
(result.status === 'FAILED' && result.willBeRetried));
|
|
19
18
|
}
|
|
20
19
|
exports.isWarning = isWarning;
|
|
21
20
|
function isIssue(result) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"issue_helpers.js","sourceRoot":"","sources":["../../../src/formatter/helpers/issue_helpers.ts"],"names":[],"mappings":";;;;;;AAAA,kEAAwC;AACxC
|
|
1
|
+
{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AAM,CAAC,MAAM,CAAC,CAAA;IAC1C,CAAC,CAAC,CAAA;IACF,OAAO,YAAY,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;AAChC,CAAC;AAxBD,kCAwBC;AAED,SAAgB,6BAA6B,CAC3C,uBAA0D;IAE1D,MAAM,MAAM,GAAG,CAAC,gCAAgC,CAAC,CAAA;IACjD,MAAM,UAAU,GAAoD,EAAE,CAAA;IACtE,uBAAuB,CAAC,OAAO,CAAC,CAAC,aAAa,EAAE,EAAE;QAChD,UAAU,CAAC,aAAa,CAAC,IAAI,CAAC,GAAG,aAAa,CAAA;IAChD,CAAC,CAAC,CAAA;IACF,MAAM,CAAC,IAAI,CACT,MAAM,CAAC,MAAM,CAAC,UAAU,CAAC;SACtB,GAAG,CACF,CAAC,aAAa,EAAE,EAAE,CAAC,KAAK,4BAA4B,CAAC,aAAa,CAAC,EAAE,CACtE;SACA,IAAI,CAAC,IAAI,CAAC,CACd,CAAA;IACD,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,CAAA;IACnB,OAAO,MAAM,CAAC,IAAI,CAAC,EAAE,CAAC,CAAA;AACxB,CAAC;AAjBD,sEAiBC;AAED,SAAgB,4BAA4B,CAC1C,aAA8C;IAE9C,OAAO,IAAI,aAAa,CAAC,IAAI,YAAY,aAAa,CAAC,UAAU,IAAI,CAAA;AACvE,CAAC;AAJD,oEAIC","sourcesContent":["import indentString from 'indent-string'\nimport { formatTestCaseAttempt } from './test_case_attempt_formatter'\nimport * as messages from '@cucumber/messages'\nimport { IColorFns } from '../get_color_fns'\nimport StepDefinitionSnippetBuilder from '../step_definition_snippet_builder'\nimport { ISupportCodeLibrary } from '../../support_code_library_builder/types'\nimport { ITestCaseAttempt } from './event_data_collector'\n\nexport function isFailure(result: messages.TestStepResult): boolean {\n return (\n result.status === 'AMBIGUOUS' ||\n result.status === 'UNDEFINED' ||\n (result.status === 'FAILED' && !result.willBeRetried)\n )\n}\n\nexport function isWarning(result: messages.TestStepResult): boolean {\n return (\n result.status === 'PENDING' ||\n (result.status === 'FAILED' && result.willBeRetried)\n )\n}\n\nexport function isIssue(result: messages.TestStepResult): boolean {\n return isFailure(result) || isWarning(result)\n}\n\nexport interface IFormatIssueRequest {\n colorFns: IColorFns\n cwd: string\n number: number\n snippetBuilder: StepDefinitionSnippetBuilder\n testCaseAttempt: ITestCaseAttempt\n supportCodeLibrary: ISupportCodeLibrary\n}\n\nexport function formatIssue({\n colorFns,\n cwd,\n number,\n snippetBuilder,\n testCaseAttempt,\n supportCodeLibrary,\n}: IFormatIssueRequest): string {\n const prefix = `${number.toString()}) `\n const formattedTestCaseAttempt = formatTestCaseAttempt({\n colorFns,\n cwd,\n snippetBuilder,\n testCaseAttempt,\n supportCodeLibrary,\n })\n const lines = formattedTestCaseAttempt.split('\\n')\n const updatedLines = lines.map((line, index) => {\n if (index === 0) {\n return `${prefix}${line}`\n }\n return indentString(line, prefix.length)\n })\n return updatedLines.join('\\n')\n}\n\nexport function formatUndefinedParameterTypes(\n undefinedParameterTypes: messages.UndefinedParameterType[]\n): string {\n const output = [`Undefined parameter types:\\n\\n`]\n const withLatest: Record<string, messages.UndefinedParameterType> = {}\n undefinedParameterTypes.forEach((parameterType) => {\n withLatest[parameterType.name] = parameterType\n })\n output.push(\n Object.values(withLatest)\n .map(\n (parameterType) => `- ${formatUndefinedParameterType(parameterType)}`\n )\n .join('\\n')\n )\n output.push('\\n\\n')\n return output.join('')\n}\n\nexport function formatUndefinedParameterType(\n parameterType: messages.UndefinedParameterType\n): string {\n return `\"${parameterType.name}\" e.g. \\`${parameterType.expression}\\``\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"keyword_type.js","sourceRoot":"","sources":["../../../src/formatter/helpers/keyword_type.ts"],"names":[],"mappings":";;;;;;AAAA,oDAAsB;AACtB,+CAAqD;AACrD,uDAAmD;AAEnD,IAAY,WAIX;AAJD,WAAY,WAAW;IACrB,4CAA6B,CAAA;IAC7B,8BAAe,CAA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AC,CAAA;IAC3C,MAAM,YAAY,GAAG,CAAC,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,KAAK,CAAU,CAAA;IACrE,MAAM,IAAI,GAAG,gBAAC,CAAC,IAAI,CAAC,YAAY,EAAE,CAAC,GAAG,EAAE,EAAE,CAAC,gBAAC,CAAC,QAAQ,CAAC,OAAO,CAAC,GAAG,CAAC,EAAE,OAAO,CAAC,CAAC,CAAA;IAC7E,QAAQ,IAAI,EAAE;QACZ,KAAK,MAAM;YACT,OAAO,WAAW,CAAC,KAAK,CAAA;QAC1B,KAAK,MAAM;YACT,OAAO,WAAW,CAAC,OAAO,CAAA;QAC5B,KAAK,KAAK,CAAC;QACX,KAAK,KAAK;YACR,IAAI,6BAAa,CAAC,mBAAmB,CAAC,EAAE;gBACtC,OAAO,mBAAmB,CAAA;aAC3B;QACH,cAAc;QACd;YACE,OAAO,WAAW,CAAC,YAAY,CAAA;KAClC;AACH,CAAC;AAtBD,gDAsBC","sourcesContent":["import _ from 'lodash'\nimport { Dialect, dialects } from '@cucumber/gherkin'\nimport { doesHaveValue } from '../../value_checker'\n\nexport enum KeywordType {\n Precondition = 'precondition',\n Event = 'event',\n Outcome = 'outcome',\n}\n\nexport interface IGetStepKeywordTypeOptions {\n keyword: string\n language: string\n previousKeywordType?: KeywordType\n}\n\nexport function getStepKeywordType({\n keyword,\n language,\n previousKeywordType,\n}: IGetStepKeywordTypeOptions): KeywordType {\n const dialect: Dialect = dialects[language]\n const stepKeywords = ['given', 'when', 'then', 'and', 'but'] as const\n const type = _.find(stepKeywords, (key) => _.includes(dialect[key], keyword))\n switch (type) {\n case 'when':\n return KeywordType.Event\n case 'then':\n return KeywordType.Outcome\n case 'and':\n case 'but':\n if (doesHaveValue(previousKeywordType)) {\n return previousKeywordType\n }\n // fallthrough\n default:\n return KeywordType.Precondition\n }\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"location_helpers.js","sourceRoot":"","sources":["../../../src/formatter/helpers/location_helpers.ts"],"names":[],"mappings":";;;;;;AAAA,gDAAuB;AACvB,uDAAmD;AAGnD,SAAgB,cAAc,CAAC,GAAgB,EAAE,GAAY;IAC3D,IAAI,GAAG,GAAG,GAAG,CAAC,GAAG,CAAA;IACjB,IAAI,6BAAa,CAAC,GAAG,CAAC,EAAE;QACtB,GAAG,GAAG,cAAI,CAAC,QAAQ,CAAC,GAAG,EAAE,GAAG,CAAC,CAAA;KAC9B;IACD,OAAO,GAAG,GAAG,IAAI,GAAG,CAAC,IAAI,CAAC,QAAQ,EAAE,EAAE,CAAA;AACxC,CAAC;AAND,wCAMC"}
|
|
1
|
+
{"version":3,"file":"location_helpers.js","sourceRoot":"","sources":["../../../src/formatter/helpers/location_helpers.ts"],"names":[],"mappings":";;;;;;AAAA,gDAAuB;AACvB,uDAAmD;AAGnD,SAAgB,cAAc,CAAC,GAAgB,EAAE,GAAY;IAC3D,IAAI,GAAG,GAAG,GAAG,CAAC,GAAG,CAAA;IACjB,IAAI,6BAAa,CAAC,GAAG,CAAC,EAAE;QACtB,GAAG,GAAG,cAAI,CAAC,QAAQ,CAAC,GAAG,EAAE,GAAG,CAAC,CAAA;KAC9B;IACD,OAAO,GAAG,GAAG,IAAI,GAAG,CAAC,IAAI,CAAC,QAAQ,EAAE,EAAE,CAAA;AACxC,CAAC;AAND,wCAMC","sourcesContent":["import path from 'path'\nimport { doesHaveValue } from '../../value_checker'\nimport { ILineAndUri } from '../../types'\n\nexport function formatLocation(obj: ILineAndUri, cwd?: string): string {\n let uri = obj.uri\n if (doesHaveValue(cwd)) {\n uri = path.relative(cwd, uri)\n }\n return `${uri}:${obj.line.toString()}`\n}\n"]}
|
|
@@ -1,18 +1,17 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { messages } from '@cucumber/messages';
|
|
1
|
+
import * as messages from '@cucumber/messages';
|
|
3
2
|
export interface IGetPickleLocationRequest {
|
|
4
|
-
gherkinDocument: messages.
|
|
5
|
-
pickle: messages.
|
|
3
|
+
gherkinDocument: messages.GherkinDocument;
|
|
4
|
+
pickle: messages.Pickle;
|
|
6
5
|
}
|
|
7
6
|
export interface IGetStepKeywordRequest {
|
|
8
|
-
pickleStep: messages.
|
|
9
|
-
gherkinStepMap:
|
|
7
|
+
pickleStep: messages.PickleStep;
|
|
8
|
+
gherkinStepMap: Record<string, messages.Step>;
|
|
10
9
|
}
|
|
11
10
|
export interface IGetScenarioDescriptionRequest {
|
|
12
|
-
pickle: messages.
|
|
13
|
-
gherkinScenarioMap:
|
|
11
|
+
pickle: messages.Pickle;
|
|
12
|
+
gherkinScenarioMap: Record<string, messages.Scenario>;
|
|
14
13
|
}
|
|
15
14
|
export declare function getScenarioDescription({ pickle, gherkinScenarioMap, }: IGetScenarioDescriptionRequest): string;
|
|
16
15
|
export declare function getStepKeyword({ pickleStep, gherkinStepMap, }: IGetStepKeywordRequest): string;
|
|
17
|
-
export declare function getPickleStepMap(pickle: messages.
|
|
18
|
-
export declare function getPickleLocation({ gherkinDocument, pickle, }: IGetPickleLocationRequest): messages.
|
|
16
|
+
export declare function getPickleStepMap(pickle: messages.Pickle): Record<string, messages.PickleStep>;
|
|
17
|
+
export declare function getPickleLocation({ gherkinDocument, pickle, }: IGetPickleLocationRequest): messages.Location;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pickle_parser.js","sourceRoot":"","sources":["../../../src/formatter/helpers/pickle_parser.ts"],"names":[],"mappings":";;;;;;AAAA,
|
|
1
|
+
{"version":3,"file":"pickle_parser.js","sourceRoot":"","sources":["../../../src/formatter/helpers/pickle_parser.ts"],"names":[],"mappings":";;;;;;AAAA,oDAAsB;AACtB,uEAAyE;AAkBzE,SAAgB,sBAAsB,CAAC,EACrC,MAAM,EACN,kBAAkB,GACa;IAC/B,OAAO,gBAAC,CAAC,KAAK,CAAC,MAAM,CAAC,UAAU,CAAC;SAC9B,GAAG,CAAC,CAAC,EAAE,EAAE,EAAE,CAAC,kBAAkB,CAAC,EAAE,CAAC,CAAC;SACnC,OAAO,EAAE;SACT,KAAK,EAAE;SACP,KAAK,EAAE,CAAC,WAAW,CAAA;AACxB,CAAC;AATD,wDASC;AAED,SAAgB,cAAc,CAAC,EAC7B,UAAU,EACV,cAAc,GACS;IACvB,OAAO,gBAAC,CAAC,KAAK,CAAC,UAAU,CAAC,UAAU,CAAC;SAClC,GAAG,CAAC,CAAC,EAAE,EAAE,EAAE,CAAC,cAAc,CAAC,EAAE,CAAC,CAAC;SAC/B,OAAO,EAAE;SACT,KAAK,EAAE;SACP,KAAK,EAAE,CAAC,OAAO,CAAA;AACpB,CAAC;AATD,wCASC;AAED,SAAgB,gBAAgB,CAC9B,MAAuB;IAEvB,OAAO,gBAAC,CAAC,KAAK,CAAC,MAAM,CAAC,KAAK,CAAC;SACzB,GAAG,CAAC,CAAC,UAAU,EAAE,EAAE,CAAC,CAAC,UAAU,CAAC,EAAE,EAAE,UAAU,CAAC,CAAC;SAChD,SAAS,EAAE;SACX,KAAK,EAAE,CAAA;AACZ,CAAC;AAPD,4CAOC;AAED,SAAgB,iBAAiB,CAAC,EAChC,eAAe,EACf,MAAM,GACoB;IAC1B,MAAM,0BAA0B,GAC9B,uDAA6B,CAAC,eAAe,CAAC,CAAA;IAChD,OAAO,0BAA0B,CAAC,gBAAC,CAAC,IAAI,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC,CAAA;AAC9D,CAAC;AAPD,8CAOC","sourcesContent":["import _ from 'lodash'\nimport { getGherkinScenarioLocationMap } from './gherkin_document_parser'\nimport * as messages from '@cucumber/messages'\n\nexport interface IGetPickleLocationRequest {\n gherkinDocument: messages.GherkinDocument\n pickle: messages.Pickle\n}\n\nexport interface IGetStepKeywordRequest {\n pickleStep: messages.PickleStep\n gherkinStepMap: Record<string, messages.Step>\n}\n\nexport interface IGetScenarioDescriptionRequest {\n pickle: messages.Pickle\n gherkinScenarioMap: Record<string, messages.Scenario>\n}\n\nexport function getScenarioDescription({\n pickle,\n gherkinScenarioMap,\n}: IGetScenarioDescriptionRequest): string {\n return _.chain(pickle.astNodeIds)\n .map((id) => gherkinScenarioMap[id])\n .compact()\n .first()\n .value().description\n}\n\nexport function getStepKeyword({\n pickleStep,\n gherkinStepMap,\n}: IGetStepKeywordRequest): string {\n return _.chain(pickleStep.astNodeIds)\n .map((id) => gherkinStepMap[id])\n .compact()\n .first()\n .value().keyword\n}\n\nexport function getPickleStepMap(\n pickle: messages.Pickle\n): Record<string, messages.PickleStep> {\n return _.chain(pickle.steps)\n .map((pickleStep) => [pickleStep.id, pickleStep])\n .fromPairs()\n .value()\n}\n\nexport function getPickleLocation({\n gherkinDocument,\n pickle,\n}: IGetPickleLocationRequest): messages.Location {\n const gherkinScenarioLocationMap =\n getGherkinScenarioLocationMap(gherkinDocument)\n return gherkinScenarioLocationMap[_.last(pickle.astNodeIds)]\n}\n"]}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import
|
|
2
|
-
export declare function formatStepArgument(arg: messages.
|
|
1
|
+
import * as messages from '@cucumber/messages';
|
|
2
|
+
export declare function formatStepArgument(arg: messages.PickleStepArgument): string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"step_argument_formatter.js","sourceRoot":"","sources":["../../../src/formatter/helpers/step_argument_formatter.ts"],"names":[],"mappings":";;;;;;AAAA,4DAA8B;AAC9B,yDAAwD;AAGxD,SAAS,eAAe,
|
|
1
|
+
{"version":3,"file":"step_argument_formatter.js","sourceRoot":"","sources":["../../../src/formatter/helpers/step_argument_formatter.ts"],"names":[],"mappings":";;;;;;AAAA,4DAA8B;AAC9B,yDAAwD;AAGxD,SAAS,eAAe,CAAC,SAA+B;IACtD,MAAM,KAAK,GAAG,IAAI,oBAAK,CAAC;QACtB,KAAK,EAAE;YACL,MAAM,EAAE,EAAE;YACV,aAAa,EAAE,EAAE;YACjB,YAAY,EAAE,EAAE;YAChB,cAAc,EAAE,EAAE;YAClB,IAAI,EAAE,GAAG;YACT,UAAU,EAAE,EAAE;YACd,GAAG,EAAE,EAAE;YACP,SAAS,EAAE,EAAE;YACb,MAAM,EAAE,GAAG;YACX,KAAK,EAAE,GAAG;YACV,WAAW,EAAE,EAAE;YACf,GAAG,EAAE,EAAE;YACP,UAAU,EAAE,EAAE;YACd,SAAS,EAAE,EAAE;YACb,WAAW,EAAE,EAAE;SAChB;QACD,KAAK,EAAE;YACL,MAAM,EAAE,EAAE;YACV,cAAc,EAAE,CAAC;YACjB,eAAe,EAAE,CAAC;SACnB;KACF,CAAC,CAAA;IACF,MAAM,IAAI,GAAG,SAAS,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE,CACtC,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CACrB,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC,OAAO,CAAC,KAAK,EAAE,KAAK,CAAC,CACxD,CACF,CAAA;IACD,KAAK,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC,CAAA;IACnB,OAAO,KAAK,CAAC,QAAQ,EAAE,CAAA;AACzB,CAAC;AAED,SAAS,eAAe,CAAC,SAAmC;IAC1D,OAAO,QAAQ,SAAS,CAAC,OAAO,OAAO,CAAA;AACzC,CAAC;AAED,SAAgB,kBAAkB,CAAC,GAAgC;IACjE,OAAO,kCAAiB,CAAC,GAAG,EAAE;QAC5B,SAAS,EAAE,eAAe;QAC1B,SAAS,EAAE,eAAe;KAC3B,CAAC,CAAA;AACJ,CAAC;AALD,gDAKC","sourcesContent":["import Table from 'cli-table3'\nimport { parseStepArgument } from '../../step_arguments'\nimport * as messages from '@cucumber/messages'\n\nfunction formatDataTable(dataTable: messages.PickleTable): string {\n const table = new Table({\n chars: {\n bottom: '',\n 'bottom-left': '',\n 'bottom-mid': '',\n 'bottom-right': '',\n left: '|',\n 'left-mid': '',\n mid: '',\n 'mid-mid': '',\n middle: '|',\n right: '|',\n 'right-mid': '',\n top: '',\n 'top-left': '',\n 'top-mid': '',\n 'top-right': '',\n },\n style: {\n border: [],\n 'padding-left': 1,\n 'padding-right': 1,\n },\n })\n const rows = dataTable.rows.map((row) =>\n row.cells.map((cell) =>\n cell.value.replace(/\\\\/g, '\\\\\\\\').replace(/\\n/g, '\\\\n')\n )\n )\n table.push(...rows)\n return table.toString()\n}\n\nfunction formatDocString(docString: messages.PickleDocString): string {\n return `\"\"\"\\n${docString.content}\\n\"\"\"`\n}\n\nexport function formatStepArgument(arg: messages.PickleStepArgument): string {\n return parseStepArgument(arg, {\n dataTable: formatDataTable,\n docString: formatDocString,\n })\n}\n"]}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { IColorFns } from '../get_color_fns';
|
|
2
2
|
import { ITestCaseAttempt } from './event_data_collector';
|
|
3
|
-
import
|
|
3
|
+
import * as messages from '@cucumber/messages';
|
|
4
4
|
export interface IFormatSummaryRequest {
|
|
5
5
|
colorFns: IColorFns;
|
|
6
6
|
testCaseAttempts: ITestCaseAttempt[];
|
|
7
|
-
testRunDuration: messages.
|
|
7
|
+
testRunDuration: messages.Duration;
|
|
8
8
|
}
|
|
9
9
|
export declare function formatSummary({ colorFns, testCaseAttempts, testRunDuration, }: IFormatSummaryRequest): string;
|