-
-
Notifications
You must be signed in to change notification settings - Fork 0
Initial implementation #1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5dbdef0
to
69940b9
Compare
11 tasks
This looks great. But the structure is missing a bit of fidelity that would be required to map to cucumber-js usage-json formatter. Here's a sample: [
{
"code": "async function (args, envString) {\n const renderedArgs = mustache_1.default.render((0, value_checker_1.valueOrDefault)(args, ''), this);\n const stringArgs = (0, string_argv_1.default)(renderedArgs);\n const env = this.parseEnvString(envString);\n return await this.run(this.localExecutablePath, stringArgs, env);\n}",
"line": 32,
"pattern": "I run cucumber-js with arguments `{}` and env `{}`",
"patternType": "CucumberExpression",
"uri": "features/step_definitions/cli_steps.ts",
"meanDuration": {
"seconds": 0,
"nanos": 894491702
},
"matches": [
{
"line": 40,
"text": "I run cucumber-js with arguments `` and env `CUCUMBER_PUBLISH_ENABLED=1`",
"uri": "features/publish.feature",
"duration": {
"seconds": 1,
"nanos": 869399124
}
}
]
}
] Things of note:
|
I didn't know that existsed. I'll reuse messages. |
This looks pretty decent to me. {
"stepDefinitions": [
{
"sourceReference": {
"uri": "samples/multiple-features/multiple-features.ts",
"location": {
"line": 3
}
},
"duration": {
"sum": {
"seconds": 0,
"nanos": 9000000
},
"mean": {
"seconds": 0,
"nanos": 1000000
},
"moe95": {
"seconds": 0,
"nanos": 0
}
},
"expression": {
"source": "an order for {string}",
"type": "CUCUMBER_EXPRESSION"
},
"matches": [
{
"text": "an order for \"eggs\"",
"duration": {
"seconds": 0,
"nanos": 1000000
},
"uri": "samples/multiple-features/multiple-features-1.feature",
"location": {
"line": 3,
"column": 3
}
},
... |
davidjgoss
approved these changes
Oct 14, 2025
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
🤔 What's changed?
Initial implementation of the message based usage formatter
⚡️ What's your motivation?
Extract a usage formatter with a common test set based on cucumber messages.
🏷️ What kind of change is this?
♻️ Anything particular you want feedback on?
Feature wise this implementation tries to strike a balance between the cucumber-js and cucumber-ruby and cucumber-jvm implementations.
Because the rendering is quite different for each implementation, I suspect it might be nessesary to support multiple formats. To make that possible there is a separation between creating the usage report and serializing it. I would expect all implementations to at least test the json serialization. The other formats are optional.
Is that workable?
📋 Checklist: