@dev-blinq/cucumber-js 1.0.210-dev → 1.0.211-dev
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/lib/formatter/progress_formatter.d.ts +2 -1
- package/lib/formatter/progress_formatter.js.map +1 -1
- package/lib/formatter/snippets_formatter.js.map +1 -1
- package/lib/formatter/usage_formatter.js.map +1 -1
- package/lib/formatter/usage_json_formatter.js.map +1 -1
- package/lib/pickle_filter.d.ts +3 -2
- package/lib/pickle_filter.js.map +1 -1
- package/lib/uncaught_exception_manager.d.ts +1 -1
- package/lib/uncaught_exception_manager.js.map +1 -1
- package/lib/version.d.ts +1 -1
- package/lib/version.js +1 -1
- package/lib/version.js.map +1 -1
- package/package.json +2 -1
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import SummaryFormatter from './summary_formatter';
|
|
2
2
|
import { IFormatterOptions } from './index';
|
|
3
3
|
import * as messages from '@cucumber/messages';
|
|
4
|
-
|
|
4
|
+
type ITestStepFinished = messages.TestStepFinished;
|
|
5
5
|
export default class ProgressFormatter extends SummaryFormatter {
|
|
6
6
|
static readonly documentation: string;
|
|
7
7
|
constructor(options: IFormatterOptions);
|
|
8
8
|
logProgress({ testStepResult: { status } }: ITestStepFinished): void;
|
|
9
9
|
}
|
|
10
|
+
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"progress_formatter.js","sourceRoot":"","sources":["../../src/formatter/progress_formatter.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,4EAAkD;AAClD,oDAAgD;AAEhD,6DAA8C;AAI9C,MAAM,wBAAwB,GAC5B,IAAI,GAAG,CAAC;IACN,CAAC,QAAQ,CAAC,oBAAoB,CAAC,SAAS,EAAE,GAAG,CAAC;IAC9C,CAAC,QAAQ,CAAC,oBAAoB,CAAC,MAAM,EAAE,GAAG,CAAC;IAC3C,CAAC,QAAQ,CAAC,oBAAoB,CAAC,MAAM,EAAE,GAAG,CAAC;IAC3C,CAAC,QAAQ,CAAC,oBAAoB,CAAC,OAAO,EAAE,GAAG,CAAC;IAC5C,CAAC,QAAQ,CAAC,oBAAoB,CAAC,OAAO,EAAE,GAAG,CAAC;IAC5C,CAAC,QAAQ,CAAC,oBAAoB,CAAC,SAAS,EAAE,GAAG,CAAC;CAC/C,CAAC,CAAA;AAEJ,MAAqB,iBAAkB,SAAQ,2BAAgB;IAI7D,YAAY,OAA0B;QACpC,OAAO,CAAC,gBAAgB,CAAC,EAAE,CAAC,UAAU,EAAE,CAAC,QAAmB,EAAE,EAAE;YAC9D,IAAI,IAAA,6BAAa,EAAC,QAAQ,CAAC,eAAe,CAAC,EAAE;gBAC3C,IAAI,CAAC,GAAG,CAAC,MAAM,CAAC,CAAA;aACjB;iBAAM,IAAI,IAAA,6BAAa,EAAC,QAAQ,CAAC,gBAAgB,CAAC,EAAE;gBACnD,IAAI,CAAC,WAAW,CAAC,QAAQ,CAAC,gBAAgB,CAAC,CAAA;aAC5C;QACH,CAAC,CAAC,CAAA;QACF,KAAK,CAAC,OAAO,CAAC,CAAA;IAChB,CAAC;IAED,WAAW,CAAC,EAAE,cAAc,EAAE,EAAE,MAAM,EAAE,EAAqB;QAC3D,MAAM,SAAS,GAAG,IAAI,CAAC,QAAQ,CAAC,SAAS,CAAC,MAAM,CAAC,CAC/C,wBAAwB,CAAC,GAAG,CAAC,MAAM,CAAC,CACrC,CAAA;QACD,IAAI,CAAC,GAAG,CAAC,SAAS,CAAC,CAAA;IACrB,CAAC;;AApBH,oCAqBC;AApBwB,+BAAa,GAClC,oCAAoC,CAAA","sourcesContent":["import SummaryFormatter from './summary_formatter'\nimport { doesHaveValue } from '../value_checker'\nimport { IFormatterOptions } from './index'\nimport * as messages from '@cucumber/messages'\
|
|
1
|
+
{"version":3,"file":"progress_formatter.js","sourceRoot":"","sources":["../../src/formatter/progress_formatter.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,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wB,+BAAa,GAClC,oCAAoC,CAAA","sourcesContent":["import SummaryFormatter from './summary_formatter'\nimport { doesHaveValue } from '../value_checker'\nimport { IFormatterOptions } from './index'\nimport * as messages from '@cucumber/messages'\ntype IEnvelope = messages.Envelope\ntype ITestStepFinished = messages.TestStepFinished\n\nconst STATUS_CHARACTER_MAPPING: Map<messages.TestStepResultStatus, string> =\n new Map([\n [messages.TestStepResultStatus.AMBIGUOUS, 'A'],\n [messages.TestStepResultStatus.FAILED, 'F'],\n [messages.TestStepResultStatus.PASSED, '.'],\n [messages.TestStepResultStatus.PENDING, 'P'],\n [messages.TestStepResultStatus.SKIPPED, '-'],\n [messages.TestStepResultStatus.UNDEFINED, 'U'],\n ])\n\nexport default class ProgressFormatter extends SummaryFormatter {\n public static readonly documentation: string =\n 'Prints one character per scenario.'\n\n constructor(options: IFormatterOptions) {\n options.eventBroadcaster.on('envelope', (envelope: IEnvelope) => {\n if (doesHaveValue(envelope.testRunFinished)) {\n this.log('\\n\\n')\n } else if (doesHaveValue(envelope.testStepFinished)) {\n this.logProgress(envelope.testStepFinished)\n }\n })\n super(options)\n }\n\n logProgress({ testStepResult: { status } }: ITestStepFinished): void {\n const character = this.colorFns.forStatus(status)(\n STATUS_CHARACTER_MAPPING.get(status)\n )\n this.log(character)\n }\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"snippets_formatter.js","sourceRoot":"","sources":["../../src/formatter/snippets_formatter.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,0CAAiD;AACjD,uCAAgD;AAChD,oDAAgD;AAChD,6DAA8C;AAG9C,MAAqB,iBAAkB,SAAQ,UAAS;IAItD,YAAY,OAA0B;QACpC,KAAK,CAAC,OAAO,CAAC,CAAA;QACd,OAAO,CAAC,gBAAgB,CAAC,EAAE,CAAC,UAAU,EAAE,CAAC,QAAmB,EAAE,EAAE;YAC9D,IAAI,IAAA,6BAAa,EAAC,QAAQ,CAAC,eAAe,CAAC,EAAE;gBAC3C,IAAI,CAAC,WAAW,EAAE,CAAA;aACnB;QACH,CAAC,CAAC,CAAA;IACJ,CAAC;IAED,WAAW;QACT,MAAM,QAAQ,GAAa,EAAE,CAAA;QAC7B,IAAI,CAAC,kBAAkB,CAAC,mBAAmB,EAAE,CAAC,OAAO,CAAC,CAAC,eAAe,EAAE,EAAE;YACxE,MAAM,MAAM,GAAG,IAAA,8BAAoB,EAAC;gBAClC,cAAc,EAAE,IAAI,CAAC,cAAc;gBACnC,kBAAkB,EAAE,IAAI,CAAC,kBAAkB;gBAC3C,eAAe;aAChB,CAAC,CAAA;YACF,MAAM,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC,QAAQ,EAAE,EAAE;gBACpC,IACE,QAAQ,CAAC,MAAM,CAAC,MAAM,KAAK,QAAQ,CAAC,oBAAoB,CAAC,SAAS,EAClE;oBACA,QAAQ,CAAC,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAA;iBAChC;YACH,CAAC,CAAC,CAAA;QACJ,CAAC,CAAC,CAAA;QACF,IAAI,CAAC,GAAG,CAAC,QAAQ,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAA;IACjC,CAAC;;AA9BH,oCA+BC;AA9BwB,+BAAa,GAClC,iIAAiI,CAAA","sourcesContent":["import Formatter, { IFormatterOptions } from './'\nimport { parseTestCaseAttempt } from './helpers'\nimport { doesHaveValue } from '../value_checker'\nimport * as messages from '@cucumber/messages'\
|
|
1
|
+
{"version":3,"file":"snippets_formatter.js","sourceRoot":"","sources":["../../src/formatter/snippets_formatter.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,0CAAiD;AACjD,uCAAgD;AAChD,oDAAgD;AAChD,6DAA8C;AAG9C,MAAqB,iBAAkB,SAAQ,UAAS;IAItD,YAAY,OAA0B;QACpC,KAAK,CAAC,OAAO,CAAC,CAAA;QACd,OAAO,CAAC,gBAAgB,CAAC,EAAE,CAAC,UAAU,EAAE,CAAC,QAAmB,EAAE,EAAE;YAC9D,IAAI,IAAA,6BAAa,EAAC,QAAQ,CAAC,eAAe,CAAC,EAAE;gBAC3C,IAAI,CAAC,WAAW,EAAE,CAAA;aACnB;QACH,CAAC,CAAC,CAAA;IACJ,CAAC;IAED,WAAW;QACT,MAAM,QAAQ,GAAa,EAAE,CAAA;QAC7B,IAAI,CAAC,kBAAkB,CAAC,mBAAmB,EAAE,CAAC,OAAO,CAAC,CAAC,eAAe,EAAE,EAAE;YACxE,MAAM,MAAM,GAAG,IAAA,8BAAoB,EAAC;gBAClC,cAAc,EAAE,IAAI,CAAC,cAAc;gBACnC,kBAAkB,EAAE,IAAI,CAAC,kBAAkB;gBAC3C,eAAe;aAChB,CAAC,CAAA;YACF,MAAM,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC,QAAQ,EAAE,EAAE;gBACpC,IACE,QAAQ,CAAC,MAAM,CAAC,MAAM,KAAK,QAAQ,CAAC,oBAAoB,CAAC,SAAS,EAClE;oBACA,QAAQ,CAAC,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAA;iBAChC;YACH,CAAC,CAAC,CAAA;QACJ,CAAC,CAAC,CAAA;QACF,IAAI,CAAC,GAAG,CAAC,QAAQ,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAA;IACjC,CAAC;;AA9BH,oCA+BC;AA9BwB,+BAAa,GAClC,iIAAiI,CAAA","sourcesContent":["import Formatter, { IFormatterOptions } from './'\nimport { parseTestCaseAttempt } from './helpers'\nimport { doesHaveValue } from '../value_checker'\nimport * as messages from '@cucumber/messages'\ntype IEnvelope = messages.Envelope\n\nexport default class SnippetsFormatter extends Formatter {\n public static readonly documentation: string =\n \"The Snippets Formatter doesn't output anything regarding the test run; it just prints snippets to implement any undefined steps\"\n\n constructor(options: IFormatterOptions) {\n super(options)\n options.eventBroadcaster.on('envelope', (envelope: IEnvelope) => {\n if (doesHaveValue(envelope.testRunFinished)) {\n this.logSnippets()\n }\n })\n }\n\n logSnippets(): void {\n const snippets: string[] = []\n this.eventDataCollector.getTestCaseAttempts().forEach((testCaseAttempt) => {\n const parsed = parseTestCaseAttempt({\n snippetBuilder: this.snippetBuilder,\n supportCodeLibrary: this.supportCodeLibrary,\n testCaseAttempt,\n })\n parsed.testSteps.forEach((testStep) => {\n if (\n testStep.result.status === messages.TestStepResultStatus.UNDEFINED\n ) {\n snippets.push(testStep.snippet)\n }\n })\n })\n this.log(snippets.join('\\n\\n'))\n }\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"usage_formatter.js","sourceRoot":"","sources":["../../src/formatter/usage_formatter.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,uCAAoD;AACpD,0CAAiD;AACjD,4DAA8B;AAC9B,oDAAgD;AAChD,6DAA8C;AAG9C,MAAqB,cAAe,SAAQ,UAAS;IAInD,YAAY,OAA0B;QACpC,KAAK,CAAC,OAAO,CAAC,CAAA;QACd,OAAO,CAAC,gBAAgB,CAAC,EAAE,CAAC,UAAU,EAAE,CAAC,QAAmB,EAAE,EAAE;YAC9D,IAAI,IAAA,6BAAa,EAAC,QAAQ,CAAC,eAAe,CAAC,EAAE;gBAC3C,IAAI,CAAC,QAAQ,EAAE,CAAA;aAChB;QACH,CAAC,CAAC,CAAA;IACJ,CAAC;IAED,QAAQ;QACN,MAAM,KAAK,GAAG,IAAA,kBAAQ,EAAC;YACrB,eAAe,EAAE,IAAI,CAAC,kBAAkB,CAAC,eAAe;YACxD,kBAAkB,EAAE,IAAI,CAAC,kBAAkB;SAC5C,CAAC,CAAA;QACF,IAAI,KAAK,CAAC,MAAM,KAAK,CAAC,EAAE;YACtB,IAAI,CAAC,GAAG,CAAC,qBAAqB,CAAC,CAAA;YAC/B,OAAM;SACP;QACD,MAAM,KAAK,GAAG,IAAI,oBAAK,CAAC;YACtB,IAAI,EAAE,CAAC,gBAAgB,EAAE,UAAU,EAAE,UAAU,CAAC;Y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,QAAQ,CACf,CAAC,OAAO,CAAC,CAAC,CAAC,IAAI,CACjB,CAAA;iBACF;qBAAM;oBACL,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,CAAA;iBACf;gBACD,IAAI,CAAC,IAAI,CAAC,IAAA,wBAAc,EAAC,KAAK,CAAC,CAAC,CAAA;YAClC,CAAC,CAAC,CAAA;YACF,IAAI,OAAO,CAAC,MAAM,GAAG,CAAC,EAAE;gBACtB,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,QAAQ,EAAE,OAAO,CAAC,CAAA;aACvD;YACD,KAAK,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,CAAQ,CAAC,CAAA;QACxE,CAAC,CACF,CAAA;QACD,IAAI,CAAC,GAAG,CAAC,GAAG,KAAK,CAAC,QAAQ,EAAE,IAAI,CAAC,CAAA;IACnC,CAAC;;AAvEH,iCAwEC;AAvEwB,4BAAa,GAClC,6MAA6M,CAAA","sourcesContent":["import { formatLocation, getUsage } from './helpers'\nimport Formatter, { IFormatterOptions } from './'\nimport Table from 'cli-table3'\nimport { doesHaveValue } from '../value_checker'\nimport * as messages from '@cucumber/messages'\
|
|
1
|
+
{"version":3,"file":"usage_formatter.js","sourceRoot":"","sources":["../../src/formatter/usage_formatter.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,uCAAoD;AACpD,0CAAiD;AACjD,4DAA8B;AAC9B,oDAAgD;AAChD,6DAA8C;AAG9C,MAAqB,cAAe,SAAQ,UAAS;IAInD,YAAY,OAA0B;QACpC,KAAK,CAAC,OAAO,CAAC,CAAA;QACd,OAAO,CAAC,gBAAgB,CAAC,EAAE,CAAC,UAAU,EAAE,CAAC,QAAmB,EAAE,EAAE;YAC9D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B,4BAAa,GAClC,6MAA6M,CAAA","sourcesContent":["import { formatLocation, getUsage } from './helpers'\nimport Formatter, { IFormatterOptions } from './'\nimport Table from 'cli-table3'\nimport { doesHaveValue } from '../value_checker'\nimport * as messages from '@cucumber/messages'\ntype IEnvelope = messages.Envelope\n\nexport default class UsageFormatter extends Formatter {\n public static readonly documentation: string =\n 'Prints where step definitions are used. The slowest step definitions (with duration) are listed first. If --dry-run is used the duration is not shown, and step definitions are sorted by filename instead.'\n\n constructor(options: IFormatterOptions) {\n super(options)\n options.eventBroadcaster.on('envelope', (envelope: IEnvelope) => {\n if (doesHaveValue(envelope.testRunFinished)) {\n this.logUsage()\n }\n })\n }\n\n logUsage(): void {\n const usage = getUsage({\n stepDefinitions: this.supportCodeLibrary.stepDefinitions,\n eventDataCollector: this.eventDataCollector,\n })\n if (usage.length === 0) {\n this.log('No step definitions')\n return\n }\n const table = new Table({\n head: ['Pattern / Text', 'Duration', 'Location'],\n style: {\n border: [],\n head: [],\n },\n })\n usage.forEach(\n ({ line, matches, meanDuration, pattern, patternType, uri }) => {\n let formattedPattern = pattern\n if (patternType === 'RegularExpression') {\n formattedPattern = '/' + formattedPattern + '/'\n }\n const col1 = [formattedPattern]\n const col2 = []\n if (matches.length > 0) {\n if (doesHaveValue(meanDuration)) {\n col2.push(\n `${messages.TimeConversion.durationToMilliseconds(\n meanDuration\n ).toFixed(2)}ms`\n )\n } else {\n col2.push('-')\n }\n } else {\n col2.push('UNUSED')\n }\n const col3 = [formatLocation({ line, uri })]\n matches.slice(0, 5).forEach((match) => {\n col1.push(` ${match.text}`)\n if (doesHaveValue(match.duration)) {\n col2.push(\n `${messages.TimeConversion.durationToMilliseconds(\n match.duration\n ).toFixed(2)}ms`\n )\n } else {\n col2.push('-')\n }\n col3.push(formatLocation(match))\n })\n if (matches.length > 5) {\n col1.push(` ${(matches.length - 5).toString()} more`)\n }\n table.push([col1.join('\\n'), col2.join('\\n'), col3.join('\\n')] as any)\n }\n )\n this.log(`${table.toString()}\\n`)\n }\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"usage_json_formatter.js","sourceRoot":"","sources":["../../src/formatter/usage_json_formatter.ts"],"names":[],"mappings":";;;;;AAAA,uCAAoC;AACpC,0CAAiD;AACjD,oDAAgD;AAIhD,MAAqB,kBAAmB,SAAQ,UAAS;IAIvD,YAAY,OAA0B;QACpC,KAAK,CAAC,OAAO,CAAC,CAAA;QACd,OAAO,CAAC,gBAAgB,CAAC,EAAE,CAAC,UAAU,EAAE,CAAC,QAAmB,EAAE,EAAE;YAC9D,IAAI,IAAA,6BAAa,EAAC,QAAQ,CAAC,eAAe,CAAC,EAAE;gBAC3C,IAAI,CAAC,QAAQ,EAAE,CAAA;aAChB;QACH,CAAC,CAAC,CAAA;IACJ,CAAC;IAED,QAAQ;QACN,MAAM,KAAK,GAAG,IAAA,kBAAQ,EAAC;YACrB,eAAe,EAAE,IAAI,CAAC,kBAAkB,CAAC,eAAe;YACxD,kBAAkB,EAAE,IAAI,CAAC,kBAAkB;SAC5C,CAAC,CAAA;QACF,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,SAAS,CAAC,KAAK,EAAE,IAAI,CAAC,QAAQ,EAAE,CAAC,CAAC,CAAC,CAAA;IACnD,CAAC;IAED,QAAQ,CAAC,GAAW,EAAE,KAAU;QAC9B,IAAI,GAAG,KAAK,SAAS,EAAE;YACrB,OAAO,QAAQ,CAAC,KAAK,CAAC,CAAA;SACvB;QACD,OAAO,KAAK,CAAA;IACd,CAAC;;AA1BH,qCA2BC;AA1BwB,gCAAa,GAClC,uHAAuH,CAAA","sourcesContent":["import { getUsage } from './helpers'\nimport Formatter, { IFormatterOptions } from './'\nimport { doesHaveValue } from '../value_checker'\nimport * as messages from '@cucumber/messages'\
|
|
1
|
+
{"version":3,"file":"usage_json_formatter.js","sourceRoot":"","sources":["../../src/formatter/usage_json_formatter.ts"],"names":[],"mappings":";;;;;AAAA,uCAAoC;AACpC,0CAAiD;AACjD,oDAAgD;AAIhD,MAAqB,kBAAmB,SAAQ,UAAS;IAIvD,YAAY,OAA0B;QACpC,KAAK,CAAC,OAAO,CAAC,CAAA;QACd,OAAO,CAAC,gBAAgB,CAAC,EAAE,CAAC,UAAU,EAAE,CAAC,QAAmB,EAAE,EAAE;YAC9D,IAAI,IAAA,6BAAa,EAAC,QAAQ,CAAC,eAAe,CAAC,EAAE;gBAC3C,IAAI,CAAC,QAAQ,EAAE,CAAA;aAChB;QACH,CAAC,CAAC,CAAA;IACJ,CAAC;IAED,QAAQ;QACN,MAAM,KAAK,GAAG,IAAA,kBAAQ,EAAC;YACrB,eAAe,EAAE,IAAI,CAAC,kBAAkB,CAAC,eAAe;YACxD,kBAAkB,EAAE,IAAI,CAAC,kBAAkB;SAC5C,CAAC,CAAA;QACF,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,SAAS,CAAC,KAAK,EAAE,IAAI,CAAC,QAAQ,EAAE,CAAC,CAAC,CAAC,CAAA;IACnD,CAAC;IAED,QAAQ,CAAC,GAAW,EAAE,KAAU;QAC9B,IAAI,GAAG,KAAK,SAAS,EAAE;YACrB,OAAO,QAAQ,CAAC,KAAK,CAAC,CAAA;SACvB;QACD,OAAO,KAAK,CAAA;IACd,CAAC;;AA1BH,qCA2BC;AA1BwB,gCAAa,GAClC,uHAAuH,CAAA","sourcesContent":["import { getUsage } from './helpers'\nimport Formatter, { IFormatterOptions } from './'\nimport { doesHaveValue } from '../value_checker'\nimport * as messages from '@cucumber/messages'\ntype IEnvelope = messages.Envelope\n\nexport default class UsageJsonFormatter extends Formatter {\n public static readonly documentation: string =\n 'Does what the Usage Formatter does, but outputs JSON, which can be output to a file and then consumed by other tools.'\n\n constructor(options: IFormatterOptions) {\n super(options)\n options.eventBroadcaster.on('envelope', (envelope: IEnvelope) => {\n if (doesHaveValue(envelope.testRunFinished)) {\n this.logUsage()\n }\n })\n }\n\n logUsage(): void {\n const usage = getUsage({\n stepDefinitions: this.supportCodeLibrary.stepDefinitions,\n eventDataCollector: this.eventDataCollector,\n })\n this.log(JSON.stringify(usage, this.replacer, 2))\n }\n\n replacer(key: string, value: any): any {\n if (key === 'seconds') {\n return parseInt(value)\n }\n return value\n }\n}\n"]}
|
package/lib/pickle_filter.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as messages from '@cucumber/messages';
|
|
2
|
-
|
|
3
|
-
|
|
2
|
+
type IGherkinDocument = messages.GherkinDocument;
|
|
3
|
+
type IPickle = messages.Pickle;
|
|
4
4
|
export interface IPickleFilterOptions {
|
|
5
5
|
cwd: string;
|
|
6
6
|
featurePaths?: string[];
|
|
@@ -40,3 +40,4 @@ export declare class PickleTagFilter {
|
|
|
40
40
|
constructor(tagExpression: string);
|
|
41
41
|
matchesAllTagExpressions(pickle: messages.Pickle): boolean;
|
|
42
42
|
}
|
|
43
|
+
export {};
|
package/lib/pickle_filter.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pickle_filter.js","sourceRoot":"","sources":["../src/pickle_filter.ts"],"names":[],"mappings":";;;;;;AAAA,gDAAuB;AACvB,gFAA6C;AAC7C,yFAA2F;AAC3F,mDAAiE;AAKjE,MAAM,sBAAsB,GAAG,uBAAuB,CAAA;AActD,MAAqB,YAAY;IAK/B,YAAY,EACV,GAAG,EACH,YAAY,EACZ,KAAK,EACL,aAAa,GACQ;QACrB,IAAI,CAAC,UAAU,GAAG,IAAI,gBAAgB,CAAC,GAAG,EAAE,YAAY,CAAC,CAAA;QACzD,IAAI,CAAC,UAAU,GAAG,IAAI,gBAAgB,CAAC,KAAK,CAAC,CAAA;QAC7C,IAAI,CAAC,SAAS,GAAG,IAAI,eAAe,CAAC,aAAa,CAAC,CAAA;IACrD,CAAC;IAED,OAAO,CAAC,EACN,eAAe,EACf,MAAM,GAIP;QACC,OAAO,CACL,IAAI,CAAC,UAAU,CAAC,cAAc,CAAC,EAAE,eAAe,EAAE,MAAM,EAAE,CAAC;YAC3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AbD,4CAaC;AAED,MAAa,eAAe;IAG1B,YAAY,aAAqB;QAC/B,IAAI,IAAA,6BAAa,EAAC,aAAa,CAAC,IAAI,aAAa,KAAK,EAAE,EAAE;YACxD,IAAI,CAAC,iBAAiB,GAAG,IAAA,yBAAK,EAAC,aAAa,CAAC,CAAA;SAC9C;IACH,CAAC;IAED,wBAAwB,CAAC,MAAuB;QAC9C,IAAI,IAAA,gCAAgB,EAAC,IAAI,CAAC,iBAAiB,CAAC,EAAE;YAC5C,OAAO,IAAI,CAAA;SACZ;QACD,OAAO,IAAI,CAAC,iBAAiB,CAAC,QAAQ,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAA;IACxE,CAAC;CACF;AAfD,0CAeC","sourcesContent":["import path from 'path'\nimport parse from '@cucumber/tag-expressions'\nimport { getGherkinScenarioLocationMap } from './formatter/helpers/gherkin_document_parser'\nimport { doesHaveValue, doesNotHaveValue } from './value_checker'\nimport * as messages from '@cucumber/messages'\
|
|
1
|
+
{"version":3,"file":"pickle_filter.js","sourceRoot":"","sources":["../src/pickle_filter.ts"],"names":[],"mappings":";;;;;;AAAA,gDAAuB;AACvB,gFAA6C;AAC7C,yFAA2F;AAC3F,mDAAiE;AAKjE,MAAM,sBAAsB,GAAG,uBAAuB,CAAA;AActD,MAAqB,YAAY;IAK/B,YAAY,EACV,GAAG,EACH,YAAY,EACZ,KAAK,EACL,aAAa,GACQ;QACrB,IAAI,CAAC,UAAU,GAAG,IAAI,gBAAgB,CAAC,GAAG,EAAE,YAAY,CAAC,CAAA;QACzD,IAAI,CAAC,UAAU,GAAG,IAAI,gBAAgB,CAAC,KAAK,CAAC,CAAA;QAC7C,IAAI,CAAC,SAAS,GAAG,IAAI,eAAe,CAAC,aAAa,CAAC,CAAA;IACrD,CAAC;IAED,OAAO,CAAC,EACN,eAAe,EACf,MAAM,GAIP;QACC,OAAO,CACL,I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M,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAA;IAC3D,CAAC;CACF;AAbD,4CAaC;AAED,MAAa,eAAe;IAG1B,YAAY,aAAqB;QAC/B,IAAI,IAAA,6BAAa,EAAC,aAAa,CAAC,IAAI,aAAa,KAAK,EAAE,EAAE;YACxD,IAAI,CAAC,iBAAiB,GAAG,IAAA,yBAAK,EAAC,aAAa,CAAC,CAAA;SAC9C;IACH,CAAC;IAED,wBAAwB,CAAC,MAAuB;QAC9C,IAAI,IAAA,gCAAgB,EAAC,IAAI,CAAC,iBAAiB,CAAC,EAAE;YAC5C,OAAO,IAAI,CAAA;SACZ;QACD,OAAO,IAAI,CAAC,iBAAiB,CAAC,QAAQ,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAA;IACxE,CAAC;CACF;AAfD,0CAeC","sourcesContent":["import path from 'path'\nimport parse from '@cucumber/tag-expressions'\nimport { getGherkinScenarioLocationMap } from './formatter/helpers/gherkin_document_parser'\nimport { doesHaveValue, doesNotHaveValue } from './value_checker'\nimport * as messages from '@cucumber/messages'\ntype IGherkinDocument = messages.GherkinDocument\ntype IPickle = messages.Pickle\n\nconst FEATURE_LINENUM_REGEXP = /^(.*?)((?::[\\d]+)+)?$/\n\nexport interface IPickleFilterOptions {\n cwd: string\n featurePaths?: string[]\n names?: string[]\n tagExpression?: string\n}\n\nexport interface IMatchesAnyLineRequest {\n gherkinDocument: messages.GherkinDocument\n pickle: messages.Pickle\n}\n\nexport default class PickleFilter {\n private readonly lineFilter: PickleLineFilter\n private readonly nameFilter: PickleNameFilter\n private readonly tagFilter: PickleTagFilter\n\n constructor({\n cwd,\n featurePaths,\n names,\n tagExpression,\n }: IPickleFilterOptions) {\n this.lineFilter = new PickleLineFilter(cwd, featurePaths)\n this.nameFilter = new PickleNameFilter(names)\n this.tagFilter = new PickleTagFilter(tagExpression)\n }\n\n matches({\n gherkinDocument,\n pickle,\n }: {\n gherkinDocument: IGherkinDocument\n pickle: IPickle\n }): boolean {\n return (\n this.lineFilter.matchesAnyLine({ gherkinDocument, pickle }) &&\n this.nameFilter.matchesAnyName(pickle) &&\n this.tagFilter.matchesAllTagExpressions(pickle)\n )\n }\n}\n\nexport class PickleLineFilter {\n private readonly featureUriToLinesMapping: Record<string, number[]>\n\n constructor(cwd: string, featurePaths: string[] = []) {\n this.featureUriToLinesMapping = this.getFeatureUriToLinesMapping({\n cwd,\n featurePaths,\n })\n }\n\n getFeatureUriToLinesMapping({\n cwd,\n featurePaths,\n }: {\n cwd: string\n featurePaths: string[]\n }): Record<string, number[]> {\n const mapping: Record<string, number[]> = {}\n featurePaths.forEach((featurePath) => {\n const match = FEATURE_LINENUM_REGEXP.exec(featurePath)\n if (doesHaveValue(match)) {\n let uri = match[1]\n if (path.isAbsolute(uri)) {\n uri = path.relative(cwd, uri)\n } else {\n uri = path.normalize(uri)\n }\n const linesExpression = match[2]\n if (doesHaveValue(linesExpression)) {\n if (doesNotHaveValue(mapping[uri])) {\n mapping[uri] = []\n }\n linesExpression\n .slice(1)\n .split(':')\n .forEach((line) => {\n mapping[uri].push(parseInt(line))\n })\n }\n }\n })\n return mapping\n }\n\n matchesAnyLine({ gherkinDocument, pickle }: IMatchesAnyLineRequest): boolean {\n const uri = path.normalize(pickle.uri)\n const linesToMatch = this.featureUriToLinesMapping[uri]\n if (doesHaveValue(linesToMatch)) {\n const gherkinScenarioLocationMap =\n getGherkinScenarioLocationMap(gherkinDocument)\n const pickleLines = new Set(\n pickle.astNodeIds.map(\n (sourceId) => gherkinScenarioLocationMap[sourceId].line\n )\n )\n const linesIntersection = linesToMatch.filter((x) => pickleLines.has(x))\n return linesIntersection.length > 0\n }\n return true\n }\n}\n\nexport class PickleNameFilter {\n private readonly names: string[]\n\n constructor(names: string[] = []) {\n this.names = names\n }\n\n matchesAnyName(pickle: messages.Pickle): boolean {\n if (this.names.length === 0) {\n return true\n }\n return this.names.some((name) => pickle.name.match(name))\n }\n}\n\nexport class PickleTagFilter {\n private readonly tagExpressionNode: any // cucumber-tag-expressions does not export interface\n\n constructor(tagExpression: string) {\n if (doesHaveValue(tagExpression) && tagExpression !== '') {\n this.tagExpressionNode = parse(tagExpression)\n }\n }\n\n matchesAllTagExpressions(pickle: messages.Pickle): boolean {\n if (doesNotHaveValue(this.tagExpressionNode)) {\n return true\n }\n return this.tagExpressionNode.evaluate(pickle.tags.map((x) => x.name))\n }\n}\n"]}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="node" />
|
|
2
|
-
|
|
2
|
+
type UncaughtExceptionListener = NodeJS.UncaughtExceptionListener;
|
|
3
3
|
declare const UncaughtExceptionManager: {
|
|
4
4
|
registerHandler(handler: UncaughtExceptionListener): void;
|
|
5
5
|
unregisterHandler(handler: UncaughtExceptionListener): void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"uncaught_exception_manager.js","sourceRoot":"","sources":["../src/uncaught_exception_manager.ts"],"names":[],"mappings":";;AAEA,MAAM,wBAAwB,GAAG;IAC/B,eAAe,CAAC,OAAkC;QAChD,OAAO,CAAC,WAAW,CAAC,mBAAmB,EAAE,OAAO,CAAC,CAAA;IACnD,CAAC;IAED,iBAAiB,CAAC,OAAkC;QAClD,OAAO,CAAC,cAAc,CAAC,mBAAmB,EAAE,OAAO,CAAC,CAAA;IACtD,CAAC;CACF,CAAA;AAED,kBAAe,wBAAwB,CAAA","sourcesContent":["
|
|
1
|
+
{"version":3,"file":"uncaught_exception_manager.js","sourceRoot":"","sources":["../src/uncaught_exception_manager.ts"],"names":[],"mappings":";;AAEA,MAAM,wBAAwB,GAAG;IAC/B,eAAe,CAAC,OAAkC;QAChD,OAAO,CAAC,WAAW,CAAC,mBAAmB,EAAE,OAAO,CAAC,CAAA;IACnD,CAAC;IAED,iBAAiB,CAAC,OAAkC;QAClD,OAAO,CAAC,cAAc,CAAC,mBAAmB,EAAE,OAAO,CAAC,CAAA;IACtD,CAAC;CACF,CAAA;AAED,kBAAe,wBAAwB,CAAA","sourcesContent":["type UncaughtExceptionListener = NodeJS.UncaughtExceptionListener\n\nconst UncaughtExceptionManager = {\n registerHandler(handler: UncaughtExceptionListener): void {\n process.addListener('uncaughtException', handler)\n },\n\n unregisterHandler(handler: UncaughtExceptionListener): void {\n process.removeListener('uncaughtException', handler)\n },\n}\n\nexport default UncaughtExceptionManager\n"]}
|
package/lib/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const version = "1.0.
|
|
1
|
+
export declare const version = "1.0.211-dev";
|
package/lib/version.js
CHANGED
package/lib/version.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"version.js","sourceRoot":"","sources":["../src/version.ts"],"names":[],"mappings":";;;AAAA,2BAA2B;AACd,QAAA,OAAO,GAAG,aAAa,CAAA","sourcesContent":["// Generated by genversion.\nexport const version = '1.0.
|
|
1
|
+
{"version":3,"file":"version.js","sourceRoot":"","sources":["../src/version.ts"],"names":[],"mappings":";;;AAAA,2BAA2B;AACd,QAAA,OAAO,GAAG,aAAa,CAAA","sourcesContent":["// Generated by genversion.\nexport const version = '1.0.211-dev'\n"]}
|
package/package.json
CHANGED
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
"gherkin",
|
|
9
9
|
"tests"
|
|
10
10
|
],
|
|
11
|
-
"version": "1.0.
|
|
11
|
+
"version": "1.0.211-dev",
|
|
12
12
|
"homepage": "https://github.com/blinq-io/cucumber-js",
|
|
13
13
|
"author": "blinq.io",
|
|
14
14
|
"contributors": [
|
|
@@ -85,6 +85,7 @@
|
|
|
85
85
|
"mkdirp": "^2.1.5",
|
|
86
86
|
"mz": "^2.7.0",
|
|
87
87
|
"object-path": "^0.11.8",
|
|
88
|
+
"p-limit": "^7.2.0",
|
|
88
89
|
"progress": "^2.0.3",
|
|
89
90
|
"resolve-pkg": "^2.0.0",
|
|
90
91
|
"semver": "7.5.3",
|