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

pickle_filter: use absolute paths #962

Merged
merged 3 commits into from
Oct 24, 2017
Merged

Conversation

mmuller99
Copy link
Contributor

@mmuller99 mmuller99 commented Oct 23, 2017

resolves #924

@@ -47,7 +48,7 @@ export default class PickleFilter {
}

matchesAnyLine({ pickle, uri }) {
const lines = this.featureUriToLinesMapping[uri]
const lines = this.featureUriToLinesMapping[path.resolve(uri || '')]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does a test fail if the || '' is removed? I don't understand why that is needed

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

resolve requires a string argument, could rewrite as:

const lines = this.featureUriToLinesMapping[uri ? path.resolve(uri) : undefined]

or just return true if uri is undefined, which is the case when running with a line that does not exist

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can't think of a case where this function would be called without a uri though.

Copy link
Contributor Author

@mmuller99 mmuller99 Oct 24, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

uri is undefined during all of the line, name, and tag filters tests

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Auhh. Can you please update the unit tests so a uri is always passed in? I'd prefer not to have the || '' since in real use I expect the uri to always be there

@mmuller99
Copy link
Contributor Author

tests were setting uri to:

this.input.uri = this.scenarioPath

where this.scenarioPath was undefined

@charlierudolph charlierudolph merged commit 6e23320 into cucumber:master Oct 24, 2017
@aslakhellesoy
Copy link
Contributor

Hi @mmuller99,

Thanks for your making your first contribution to Cucumber, and welcome to the Cucumber committers team! You can now push directly to this repo and all other repos under the cucumber organization! 🍾

In return for this generous offer we hope you will:

  • ✅ Continue to use branches and pull requests. When someone on the core team approves a pull request (yours or someone else's), you're welcome to merge it yourself.
  • 💚 Commit to setting a good example by following and upholding our code of conduct in your interactions with other collaborators and users.
  • 💬 Join the community Slack channel to meet the rest of the team and make yourself at home.
  • ℹ️ Don't feel obliged to help, just do what you can if you have the time and the energy.
  • 🙋 Ask if you need anything. We're looking for feedback about how to make the project more welcoming, so please tell us!

On behalf of the Cucumber core team,
Aslak Hellesøy
Creator of Cucumber

@charlierudolph
Copy link
Member

Thanks! I'll release this later today

@mmuller99
Copy link
Contributor Author

@charlierudolph, @aslakhellesoy thanks

@gd46
Copy link
Contributor

gd46 commented Oct 25, 2017

Thanks guys for getting this fix!

@lock
Copy link

lock bot commented Oct 25, 2018

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked as resolved and limited conversation to collaborators Oct 25, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Run specific scenario in v3
4 participants