Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id BBB3C200BE4 for ; Wed, 21 Dec 2016 19:25:42 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id BA58E160B26; Wed, 21 Dec 2016 18:25:42 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 1365D160B39 for ; Wed, 21 Dec 2016 19:25:41 +0100 (CET) Received: (qmail 69284 invoked by uid 500); 21 Dec 2016 18:25:40 -0000 Mailing-List: contact dev-help@cordova.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cordova.apache.org Delivered-To: mailing list dev@cordova.apache.org Received: (qmail 68206 invoked by uid 99); 21 Dec 2016 18:25:40 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 21 Dec 2016 18:25:40 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id E59B9DFCE0; Wed, 21 Dec 2016 18:25:39 +0000 (UTC) From: stevengill To: dev@cordova.apache.org Reply-To: dev@cordova.apache.org References: In-Reply-To: Subject: [GitHub] cordova-lib pull request #510: Fixjasmine : CB:12018 - updating tests in cor... Content-Type: text/plain Message-Id: <20161221182539.E59B9DFCE0@git1-us-west.apache.org> Date: Wed, 21 Dec 2016 18:25:39 +0000 (UTC) archived-at: Wed, 21 Dec 2016 18:25:42 -0000 Github user stevengill commented on a diff in the pull request: https://github.com/apache/cordova-lib/pull/510#discussion_r93492132 --- Diff: cordova-lib/spec-plugman/platforms/windows.spec.js --- @@ -50,18 +50,30 @@ function copyArray(arr) { } beforeEach(function () { - this.addMatchers({ + jasmine.addMatchers({ toContainXmlPath: function (xpath) { var xml = this.actual; var notText = this.isNot ? 'not ' : ''; - this.message = function () { - return 'Expected xml \'' + et.tostring(xml) + '\' ' + notText + 'to contain elements matching \'' + xpath + '\'.'; - }; - - return xml.find(xpath) !== null; - } }); + // this.message = function () { + // return 'Expected xml \'' + et.tostring(xml) + '\' ' + notText + 'to contain elements matching \'' + xpath + '\'.'; + // }; + return { + compare: function(actual, expected) { + var result = {}; + result.pass = fs.existsSync(actual); + + //return xml.find(xpath) !== null; + if(result.pass) { + result.message = "expected " + actual + " to not exist"; + } else { + result.message = "expected " + actual + " to exist"; --- End diff -- update second message to `'Expected xml \'' + et.tostring(xml) + '\' ' +' to contain elements matching \'' + expected + '\'.';` --- 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 infrastructure@apache.org or file a JIRA ticket with INFRA. --- --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@cordova.apache.org For additional commands, e-mail: dev-help@cordova.apache.org