FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Allow both types of failures for invalid credentials test · nodegit/nodegit@0ea4c7b · GitHub

Repository navigation

Commit 0ea4c7b

Browse files
committed
Allow both types of failures for invalid credentials test
1 parent 185c6ca commit 0ea4c7b

1 file changed

Lines changed: 9 additions & 2 deletions

File tree

‎test/tests/remote.js‎

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -388,8 +388,15 @@ describe("Remote", function() {
388388
// catches linux / osx failure to use anonymous credentials
389389
// stops callback infinite loop
390390
.catch(function (reason) {
391-
assert.equal(reason.message.replace(/\n|\r/g, ""),
392-
"failed to set credentials: The parameter is incorrect.");
391+
const messageWithoutNewlines = reason.message.replace(/\n|\r/g, "");
392+
const validErrors = [
393+
"Method push has thrown an error",
394+
"failed to set credentials: The parameter is incorrect."
395+
];
396+
assert.ok(
397+
validErrors.includes(messageWithoutNewlines),
398+
"Unexpected error: " + reason.message
399+
);
393400
});
394401
});
395402

0 commit comments

Comments
 (0)

Back | FazBrowse Home | New Git URL