Github user sarangan12 commented on a diff in the pull request:
https://github.com/apache/cordova-plugin-file-transfer/pull/132#discussion_r57047593
--- 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 --
@dblotsky The issue is that the result could be connection error or abort
error. Both are valid in this case. So, I have created my own 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]