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)

Reply via email to