You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cordova.apache.org by "Ian Clelland (JIRA)" <ji...@apache.org> on 2014/03/28 20:07:15 UTC
[jira] [Resolved] (CB-6373) Do-not-call spies won't error if an
exception is thrown
[ https://issues.apache.org/jira/browse/CB-6373?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Ian Clelland resolved CB-6373.
------------------------------
Resolution: Fixed
Fixed now; mobile spec tests are mostly passing still :) I don't see any other failures revealed by this fix.
> Do-not-call spies won't error if an exception is thrown
> -------------------------------------------------------
>
> Key: CB-6373
> URL: https://issues.apache.org/jira/browse/CB-6373
> Project: Apache Cordova
> Issue Type: Bug
> Components: mobile-spec
> Reporter: Ian Clelland
> Assignee: Ian Clelland
>
> In the mobile spec test runner, the function created by {{createDoNotCallSpy}} logs an error message containing the JSON serialization of the function arguments, and then makes a false assertion, to cause a test to fail.
> If the function arguments are not JSON-serializable, then an exception will be thrown in the spy, and failure will never be asserted. If a test is counting on a doNotCallSpy to not be called, it may succeed, since the spy will never cause a test failure.
> (This was noticed because one of the File tests, file.spec.9, was failing unnoticed on iOS until FileEntry objects became serializable with CB-6352)
--
This message was sent by Atlassian JIRA
(v6.2#6252)