cordova-issues mailing list archives

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

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

Mime
View raw message