domenic / html-as-custom-elements

HTML as Custom Elements
https://domenic.github.io/html-as-custom-elements/
Apache License 2.0
259 stars 20 forks source link

Testing and Continuous Build? #11

Open dglazkov opened 10 years ago

dglazkov commented 10 years ago

Traceur seems to have nice build status and everything. I have no idea how to do this, but would love me summodat.

arv commented 10 years ago

It is Node.js tests using mocha+chai, set up to work with TravisCI

mereskin-zz commented 10 years ago

And probably you would want to use Karma runner, to run tests on actual browsers. PhantomJS is a little bit outdated, it doesn't support MutationObservers and CustomEvents have to be polyfilled, for example.

dglazkov commented 10 years ago

@domenic, do you have any experience with Karma or any of this stuff?

dglazkov commented 10 years ago

I'd say this should be prerequisite to writing any more code -- can't write code without writing tests :smiley:

mereskin-zz commented 10 years ago

I'd be happy to help, if yo've got time to give me a heads-up.

dglazkov commented 10 years ago

@mereskin any help and/or pull requests are appreciated. At this point, we can state the task minimum as "set up a run test/index.html and report some result, on one browser, for every commit." We can grow it from there :smiley:

mereskin-zz commented 10 years ago

16

dglazkov commented 10 years ago

Thanks, @mereskin!! Sadly, @arv and I just realized that there's no easy way to run Karma on a CI server like travis-ci. @arv is trying the testling thing now...

mereskin-zz commented 10 years ago

I believe it is possible. I will look into it when I get home

arv commented 10 years ago

Based on my very limited research travis only support Firefox and PhantomJS.

mereskin-zz commented 10 years ago

They say they have Chromium, too: https://github.com/travis-ci/travis-ci/issues/2281

dglazkov commented 10 years ago

@mereskin cool! Do you know what version? Ideally, would love to run 35+, so that we don't have to polyfill shadow DOM and custom elements. @arv got testling to work, but their browsers are somewhat stale.

mereskin-zz commented 10 years ago

Don't know, unfortunately, haven't used it yet. Worth checking.

Is polymer's CustomElements polyfill + Firefox combination completely irrelevant? So far it helped me, but I haven't done anything hardcore.

dglazkov commented 10 years ago

It's not irrelevant -- we might have to do something like that if there aren't better options. Just would like to minimize polyfills..

dglazkov commented 10 years ago

Browserstack actually seems interesting too.

domenic commented 10 years ago

I have had very bad luck with Testling/Browserling sadly. Some Sauce Labs-based solution seems good. You can then use Travis to trigger Sauce-based test runs on every build.

A few resources:

I agree Chrome 35+ is the way to go; no need for broad-spectrum coverage.

arv commented 10 years ago

Zuul looks promising.

Another option is to install Chrome on Travis: https://github.com/angular/templating/blob/1e4b135e461b6d9b50c88ab2c99f1eac16b698a5/install_chrome.sh

domenic commented 10 years ago

Hacked on Karma today to get that running. Combined with Chrome on Travis I think we'd be in a good place.