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

World is not context for event listeners #244

Closed
ctumolosus opened this issue Sep 9, 2014 · 4 comments
Closed

World is not context for event listeners #244

ctumolosus opened this issue Sep 9, 2014 · 4 comments

Comments

@ctumolosus
Copy link

I was playing around and I couldn't see the world as the context of the BeforeFeature, AfterFeature, BeforeScenario and AfterScenario event listeners. Is this the expected behavior? I guess I could always just keep a reference within a closure.

Example:

this.World = function () { this.isWorld = true };
this.registerHandler('BeforeScenario', function () { assert(this.isWorld === true); });
@jwoudenberg
Copy link

I can confirm this, running cucumber.js version 0.4.1. The documentation suggests this should be a reference the the world object.

@armandabric
Copy link

I have the same issue with cucumber 0.4.4. Any idea when this can be fix ?

@jbpros
Copy link
Member

jbpros commented Dec 21, 2014

This is not a bug. See #165 (comment) for an explanation.

I fixed the documentation which was wrong.

@jbpros jbpros closed this as completed Dec 21, 2014
@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

No branches or pull requests

4 participants