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

Test it with Zuul, package with npm, include html5shiv #47

Merged
merged 33 commits into from
Jan 26, 2015
Merged

Test it with Zuul, package with npm, include html5shiv #47

merged 33 commits into from
Jan 26, 2015

Conversation

shawnbot
Copy link
Owner

These commits introduce a zuul configuration and get everything up to snuff for automated testing with IE8 and IE9 via Sauce Labs.

Most of this work involves just getting the tests running in zuul, but some also involve forking ie8 and patching it to:

  1. work in IE9: IE9 doesn't like the Comment and Text nodeValue shims WebReflection/ie8#14
  2. work with browserify, which zuul uses to bundle scripts for testing

My first approach with ie8.js was just to monkeypatch it so that the offending lines were stripped from aight.js, but this didn't work for long. Once I got it working in IE9 I noticed that the Text#nodeValue shim was busted, and returning early from the shimming function was the simplest way to sidestep the issue. I also added some aliases between DOM interfaces to simplify other shims.

We've also got a package.json for use with npm, which lists the dev dependencies necessary (and some handy script tasks) for both bundling and testing. To test, just do this:

$ npm install --dev
$ npm run test:local

Zuul wil spit out the URL for local testing, e.g. http://localhost:8080/__zuul. Crack open a browser and paste that URL to run the tests interactively. I've been using VirtualBox and ievms to run the Internet Explorer tests (note that from within VirtualBox you will need to access the URL as http://10.0.2.2:8080/__zuul), and as of d670123 the tests pass in both IE8 and 9.

To run the automated tests, follow these instructions for telling zuul where to find your Sauce Labs credentials, then run:

$ npm test

This may take a few minutes, but you should eventually see some output that looks like this:

image

The npm run watch task is useful for rebuilding the generated files when you work on the source, and npm run watch:test restarts the local zuul test server whenever the generated files or tests are modified.

Oh, and we're including html5shiv now too, so that's cool.

shawnbot added a commit that referenced this pull request Jan 26, 2015
Test it with Zuul, package with npm, include html5shiv
@shawnbot shawnbot merged commit 58721c1 into v2 Jan 26, 2015
@shawnbot shawnbot deleted the zuul branch January 26, 2015 22:25
@shawnbot shawnbot mentioned this pull request Jan 27, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant