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

chore(test): setup karma test runner against chrome browser #1007

Closed
wants to merge 1 commit into from

Conversation

kwonoj
Copy link
Member

@kwonoj kwonoj commented Dec 9, 2015

  • initial bootstrap config for karma runner against chrome
  • ci server is not configured yet

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.

@@ -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;
Copy link
Member Author

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.

@kwonoj kwonoj force-pushed the test-karma branch 2 times, most recently from 8c3746f to 23bbe89 Compare December 9, 2015 21:02
expect(reason).toBe('fail');
done();
});
if (isNode) {
Copy link
Member Author

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
@kwonoj
Copy link
Member Author

kwonoj commented Dec 10, 2015

PR updated to have test cases per process and browser.

},
done.fail);
});
window.onerror = onException;
Copy link
Member Author

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.. :(

Copy link
Member

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.

@benlesh
Copy link
Member

benlesh commented Dec 10, 2015

LGTM

@kwonoj
Copy link
Member Author

kwonoj commented Dec 10, 2015

Merged with 9996d77. Moving forward to next step to wire with CI server..

@kwonoj kwonoj closed this Dec 10, 2015
@kwonoj kwonoj deleted the test-karma branch December 10, 2015 04:01
@lock lock bot locked as resolved and limited conversation to collaborators Jun 7, 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.

3 participants