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

Fix browser tests #4378

Merged
merged 10 commits into from
Nov 30, 2016
Merged

Fix browser tests #4378

merged 10 commits into from
Nov 30, 2016

Conversation

GeoffreyBooth
Copy link
Collaborator

This PR gets test.html working in the browser again. It had fallen a few years behind how tests were run in Cakefile, and over that time many tests started using helper functions from Node’s assert that aren’t available in the browser; and test.html‘s method of checking for test passes/fails diverged at some point from Cakefile‘s, so there were false positives (or incorrect negatives?) in the test.html test results. This PR fixes all of this, and refactors Cakefile and test.html so that shared code is not duplicated. The test for UTF-8 characters in comments (#4375) has been moved from test.html into test/comments.coffee.

I didn’t commit any generated files output under docs because I don’t want to influence the current docs, so to see this in action after you’ve checked out this branch:

  • cake build:browser
  • cake doc:site
  • Open docs/v1/test.html in a browser (a file:// link is fine)

GeoffreyBooth and others added 10 commits November 29, 2016 08:39
…dded inside it; update test.html styles; move UTF-8 comment test out of test.html and into test/comments.coffee where it belongs
…t.html, into one file that can be included into both
…uns them; most importantly, tests fail when the `test` function throws an exception, not when `ok` does (which happens intentionally a few times in the classes tests); this also produces a more accurate count of tests run
@jashkenas
Copy link
Owner

Thanks for getting these up and running again!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants