-
Notifications
You must be signed in to change notification settings - Fork 6
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
Make tests pass with Grunt #10
Comments
Now, running `grunt test` will run `connect` which serves to boot up a web server on localhost:8000. The tests are now a bit more honest because they're running on http:// instead of file://. This is really important for things like `document.cookie`, which don't work as expected on file://. http://cloud.avandamiri.com/3c3q3B3a1P2a (StackOverflow) https://www.npmjs.org/package/grunt-contrib-connect https://github.com/gruntjs/grunt-contrib-connect https://github.com/gruntjs/grunt-contrib-qunit#testing-via-http-or-https
I was able to get |
Not sure if it's possible, but maybe run these tests in isolation so grunt test only runs test that'd don't need cookie or location? |
That's a good idea. I would want to indicate that in the test output somewhere also. Something to the effect of, "x, y, and z tests skipped — please run them in a browser." |
Decided to just do away with command line tests for now. I want to look into how it's possible to get the tests running in-browser with Selenium and then have BrowserStack or SauceLabs run them. But for now, it's fine to just see them in-browser. |
Currently the tests fail from grunt because
document.cookie
doesn't work correctly when running on the file system (e.g., file://). There should be a work around.http://stackoverflow.com/questions/23926982/how-do-i-run-qunit-tests-with-grunt-through-a-local-server-instead-of-the-file-s
The text was updated successfully, but these errors were encountered: