Skip to content
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

Generation failure when no description defined #7

Closed
fpanwaskar opened this issue Jul 21, 2016 · 2 comments
Closed

Generation failure when no description defined #7

fpanwaskar opened this issue Jul 21, 2016 · 2 comments

Comments

@fpanwaskar
Copy link

Error raised when generating report because feature description is not defined.

lodash.templateSources[1]:54
((__t = ( feature.description.replace(/\n/g, '<br />') )) == null ? '' : __t) +
                             ^

TypeError: Cannot read property 'replace' of undefined

This seems to be an optional parameter (https://cucumber.io/docs/reference) and the templates need to be more defensive.

Example results:

[
  {
    "elements": [
      {
        "id": "movie-list-component;vis---movie-list",
        "keyword": "Scenario",
        "line": 41,
        "name": "VIS - Movie List",
        "steps": [
          {
            "arguments": [],
            "keyword": "Before ",
            "result": {
              "status": "passed",
              "duration": 597974
            },
            "hidden": true,
            "match": {
              "location": "/features/support/Hooks.js:2"
            }
          }
        ],
        "tags": [
          {
            "name": "@aliased",
            "line": 56
          }
        ],
        "type": "scenario"
      }
    ],
    "id": "movie-list-component",
    "keyword": "Feature",
    "line": 1,
    "name": "Movie List Component",
    "tags": [],
    "uri": "/features/example.feature"
  }
]

@gkushang
Copy link
Owner

@fpanwaskar thanks for reporting the issue. Fixed with #8 and published as version @0.2.2

@gkushang
Copy link
Owner

Closing this issue since it was fixed!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants