repairing language tests #1177

Merged
merged 1 commit into from Oct 13, 2013

Projects

None yet

3 participants

@icambron
Member
icambron commented Oct 9, 2013

We added tests to verify that languages actually exported the language they contain, but the way the test is written, it only works correctly in Node, since AMD passes the result through a callback, not as the return value to require. So our tests were failing in the browser.

I just made the test not run in the browser, and then verified it using a local instance of momentjs.com.

@ichernev
Contributor

That makes sense. Thanks!

@ichernev ichernev merged commit bbf9412 into moment:develop Oct 13, 2013

1 check passed

default The Travis CI build passed
Details
@timrwood
Member

This is due to a hack I wrote to simulate require('moment') when running nodeunit in the browser.

https://github.com/moment/momentjs.com/blob/gh-pages/source/js/test-start.js#L2-L4

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