cordova-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ian Clelland (JIRA)" <>
Subject [jira] [Resolved] (CB-6373) Do-not-call spies won't error if an exception is thrown
Date Fri, 28 Mar 2014 19:07:15 GMT


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:
>             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

View raw message