-
Notifications
You must be signed in to change notification settings - Fork 3k
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
chore(test): setup karma test runner against chrome browser #1007
Conversation
@@ -1,6 +1,6 @@ | |||
//Fail timeouts faster | |||
//Individual suites/specs should specify longer timeouts if needed. | |||
jasmine.DEFAULT_TIMEOUT_INTERVAL = 1000; | |||
jasmine.DEFAULT_TIMEOUT_INTERVAL = 5000; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
timeout interval is increased to safely executed under browser.
8c3746f
to
23bbe89
Compare
expect(reason).toBe('fail'); | ||
done(); | ||
}); | ||
if (isNode) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changed to use simple if conditional for now. Thought about adding some function like it.node
or it.browser
to be executed under certain runtime, but it could be added in further depends on how many test we'll have per different runtime.
- initial bootstrap config for karma runner against chrome - ci server is not configured yet relates to ReactiveX#998
PR updated to have test cases per |
}, | ||
done.fail); | ||
}); | ||
window.onerror = onException; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
used onerror
instead of addeventlistener(error)
, on chrome eventlistener triggers listener but still prints out error like http://jsbin.com/dipizajumu/3/edit?html,js,console (not first error actually thrown immediately)
Uncaught error
..listener behavior
happens same in Karma makes think global error is uncaught.
I'm feeling I missed some obvious thing and did some dumb thing with code snippet.. :(
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
on chrome eventlistener triggers listener but still prints out error like http://jsbin.com/dipizajumu/3/edit?html,js,console (not first error actually thrown immediately)
That's right! I was thinking to myself when I was writing that I had learned onerror
was what you wanted to use, but I could find any supporting evidence, so I posted addEventListener
. :)
Good find.
LGTM |
Merged with 9996d77. Moving forward to next step to wire with CI server.. |
relates to #998
This PR is very initial step to resolve issue, setting up karma configuration against chrome browser. Once this PR is merged, will expand browser support as well as CI server setup.