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

Error parsing background #146

Closed
retorquere opened this issue Jun 16, 2015 · 5 comments
Closed

Error parsing background #146

retorquere opened this issue Jun 16, 2015 · 5 comments

Comments

@retorquere
Copy link

With https://gist.github.com/3e9f6ff73d5caf31acdb, the parser fails with

Error: Error parsing line 12, "@test-cluster-0 @131".
Background requires one or more steps

the background does have a step though. Commenting out line 4+5 makes the error go away.

@cressie176
Copy link
Member

Suspect it's a bug. If you insert a blank line it will work.

Background:

  When I set preference .citekeyFormat to [auth][year]

This is probably a left over from an earlier version of Yadda when Scenarios could have descriptions. Please leave open and I'll investigate a bit further

@cressie176 cressie176 added the bug label Jun 16, 2015
cressie176 pushed a commit that referenced this issue Jun 17, 2015
@cressie176
Copy link
Member

The fix is easy, but want to get some feedback on whether anyone finds background descriptions useful. I've added the following console.log to the latest version of yadda.

It appears that you are using background descriptions that either span
mutliple lines or begin immediately beneath the 'Background' keyword
We are considering removing this feature. Please update
https://github.com/acuminous/yadda/issues/146 if it is important to you
You can disable this message by setting FeatureParser.silence146 to true

If no-ones raised any concerns in the next month I'll bin them.

@retorquere
Copy link
Author

You mean bin them as in remove the background feature entirely? I don't mind the extra line of whitespace, but to do without background would be a pain.

@cressie176
Copy link
Member

No, the background feature is staying. Earlier on in Yadda's lifetime I misunderstood a feature request and added descriptions to scenarios.

Scenario: This is a title
This is a description

The consequence was that you needed to add a blank line before the steps so Yadda could tell the difference between descriptions and step text. It caused no end of problems so I removed it. Looks like I forgot to remove it from Backgrounds

@samzhao
Copy link

samzhao commented Jun 30, 2015

IMHO, background description isn't necessary because the background steps are more or less the descriptions.

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

No branches or pull requests

3 participants