Github user dblotsky commented on a diff in the pull request:

    
https://github.com/apache/cordova-plugin-file-transfer/pull/132#discussion_r57049010
  
    --- Diff: tests/tests.js ---
    @@ -451,11 +451,25 @@ exports.defineAutoTests = function () {
     
                     it("filetransfer.spec.9 should not leave partial file due 
to abort", function (done) {
     
    +                    jasmine.addMatchers({
    +                        toBeAbortOrConnectionError: function() {
    +                            return {
    +                                compare: function(transferError) {
    +                                    var result = {pass: transferError === 
FileTransferError.ABORT_ERR || transferError === 
FileTransferError.CONNECTION_ERR};
    +                                    if(!result.pass) {
    +                                        result.message = "Expected " + 
transferError + " to be " + FileTransferError.ABORT_ERR + " or " + 
FileTransferError.CONNECTION_ERR;
    +                                    }
    +                                    return result;
    +                                }
    +                            }
    +                        }
    +                    });
    --- End diff --
    
    What I mean is: can't you just do this logic in the test and not have to 
have a matcher?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to