-
-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Unable to assert invalid dates #1660
Comments
a8m
added a commit
to a8m/mocha
that referenced
this issue
Apr 18, 2015
Use toString for invalid date object
Thanks @meandmycode |
Much appreciated, speedy work! |
boneskull
added a commit
that referenced
this issue
Apr 18, 2015
fix(utils/stringify): fix issue #1660
closed via #1661 |
boneskull
added a commit
to boneskull/mocha
that referenced
this issue
Jun 30, 2015
* commit '3b02d830c0c5f20c5be9acaa9ef45b824bcbf965': (29 commits) Add cross-frame compatible Error checking for fail Remove moot `version` property from bower.json HISTORY: fix typo in 2.2.5 HISTORY: improve 2.2.5 changelog removing duplicate flags adding additional iojs flags Prevent default browser behavior for failure/pass links Removes return statement irt mochajs#1700. Removes accidentally commited test.js Add support of --harmony_arrow_functions V8 option Release 2.2.5 Upgrade jsdiff to v1.4.0 fix 'location is not defined' error Update json-stream.js Sanity check: update fixtures/regression/issue-1327.js to be closer to orig test Fix diff colors use a valid SPDX license identifier Add integration tests Handling of error.htmlMessage in the HTML reporter Split message and stack into two separate variables fix(utils/stringify): fix issue mochajs#1660 ... Conflicts: test/acceptance/misc/asyncOnly.js
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
When asserting something that may return an invalid date mocha will error trying to report the invalid date due to calling
toISOString
on an invalid date.Example (using should):
I can submit a PR if it helps, I think the stringify utility just needs to call
toString()
in the event that the date is invalid, which will result in "[Date: Invalid Date]"The text was updated successfully, but these errors were encountered: