-
Notifications
You must be signed in to change notification settings - Fork 669
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
fix(test-utils): fix cancelable attribute in dom events #1460
Conversation
Hi! Good work. The tests are run in both a jsdom environment and karma (using phantomjs). You can see we have a function that will conditionally run a test depending whether it is phantomjs or not here. Does this bug not manifest in a jsdom env? What happens when you add the test? You should be able to write |
Thank you for feedback!
Thanks for pointing in the right direction! Using
Unfortunately it doesn't work. I'm getting a following error: |
Hm, how are you running the tests? Are you using |
Actually I was using |
Weird. I will pull your branch down this weekend and try it out and see if I can figure out what is going on. edit: try |
Thanks, unfortunately it still doesn't work for me. I ran:
|
@lmiller1990 by any chance have you been able to look into that? |
@lowski not yet, on the weekend (around 24-48h time). |
@lowski I see why you can't use the absolute imports now - createDOMEvent is not a public API, so it is not exported from I think it's probably okay to use the relative import for now, in this case. The other alternative would be creating the event manually instead of using the All green, let's merge this up. I'll try and do a release in the next week or so two when I've dealt with the other outstanding PRs. |
@lmiller1990 thank you! |
What kind of change does this PR introduce? (check at least one)
Does this PR introduce a breaking change? (check one)
If yes, please describe the impact and migration path for existing applications:
The PR fulfills these requirements:
dev
branch.fix #xxx[,#xxx]
, where "xxx" is the issue number)If adding a new feature, the PR's description includes:
Other information:
It's my first PR (big hello to everyone!) with a small fix to correctly assign
cancelable
attribute for events created viatrigger(event_name)
API in modern browsers.I've tried to come with some tests for this bug:
But it turns out that tests are run in PhantomJS and I believe it uses
createOldEvent
instead ofcreateEvent
which is not affected by this bug.PS. How could I import
create-dom-event
file in such test to avoid all those../../
in the beginning of the file's path?