-
Notifications
You must be signed in to change notification settings - Fork 36
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
jasminewd2 bind this
to jasmine.getEnv()
instead of an empty object.
#22
Comments
If I understand the code correctly, a simple fix might be to replace the call to
|
This was referenced Apr 7, 2015
Is it possible to review the pull request? I really need this to fully implement my tests with protractor. Thanks |
+1, this is a bug I also noticed myself, PR seems right |
Finally fixed with c0f13d2! |
juliemr
added a commit
to angular/protractor
that referenced
this issue
Apr 14, 2015
This improves the control flow schedule messages for debugging and fixes an issue with the `this` variable inside tests. See angular/jasminewd#22
bodyduardU
pushed a commit
to bodyduardU/protractor
that referenced
this issue
Dec 5, 2022
This improves the control flow schedule messages for debugging and fixes an issue with the `this` variable inside tests. See angular/jasminewd#22
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
According to the docs, jasmine 2 bind
this
to a new empty object for each test. This object can be prepared bybeforeEach
, and then is passed to the test andafterEach
method.That allows to create independent variables for each test, as described in this post: https://gist.github.com/traviskaufman/11131303
The doc explains how it is supposed to work too: http://jasmine.github.io/2.0/introduction.html#section-The_%3Ccode%3Ethis%3C/code%3E_keyword
Now, my problem is that this feature is not available in protractor: instead of being a new empty object, each test receives the jasmine environment (which is always the same).
Probably due to this code:
It is a very important feature for me to be able to get a new object on each test, it allows me to prepare the platform independently for each test (and in the future, run tests in parallel).
Is there a way to fix this?
The text was updated successfully, but these errors were encountered: