You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by ra...@apache.org on 2018/08/30 12:17:48 UTC

[cordova-cli] branch master updated: Fix tests after removing deprecated `raw` methods from lib (#308)

This is an automated email from the ASF dual-hosted git repository.

raphinesse pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/cordova-cli.git


The following commit(s) were added to refs/heads/master by this push:
     new 9eb9b30  Fix tests after removing deprecated `raw` methods from lib (#308)
9eb9b30 is described below

commit 9eb9b3081131771738073a00324f01f160f00d9c
Author: Raphael von der GrĂ¼n <ra...@gmail.com>
AuthorDate: Thu Aug 30 14:17:46 2018 +0200

    Fix tests after removing deprecated `raw` methods from lib (#308)
    
    See https://github.com/apache/cordova-cli/pull/306#issuecomment-417190230
---
 spec/cli.spec.js  | 13 -------------
 spec/help.spec.js | 10 +++++-----
 2 files changed, 5 insertions(+), 18 deletions(-)

diff --git a/spec/cli.spec.js b/spec/cli.spec.js
index 109c841..8212523 100644
--- a/spec/cli.spec.js
+++ b/spec/cli.spec.js
@@ -448,19 +448,6 @@ describe('cordova cli', function () {
     });
 });
 
-describe('raw', function () {
-    var rawInterface = cordova.raw;
-    it('has a raw implementation of previously callable commands', function (done) {
-        Object.keys(rawInterface).forEach(function (key) {
-            expect(typeof rawInterface[key]).toBe('function');
-            spyOn(cordova, key);
-            rawInterface[key](); // call the raw version
-            expect(cordova[key]).toHaveBeenCalled();
-        });
-        done();
-    });
-});
-
 describe('platform', function () {
 
     beforeEach(function () {
diff --git a/spec/help.spec.js b/spec/help.spec.js
index 84f59d7..1697a97 100644
--- a/spec/help.spec.js
+++ b/spec/help.spec.js
@@ -17,13 +17,13 @@
 var cordova_lib = require('cordova-lib');
 var cordova = cordova_lib.cordova;
 var help = require('../src/help');
-var allcommands;
+var allcommands = [
+    '', 'prepare', 'build', 'config', 'emulate', 'plugin', 'plugins',
+    'serve', 'platform', 'platforms', 'compile', 'run', 'info', 'targets',
+    'requirements', 'projectMetadata', 'clean'
+];
 
 describe('help', function () {
-    allcommands = [''].concat(Object.keys(cordova).map(function (k) {
-        if (k in cordova.raw) { return k; }
-        return null;
-    }).filter(function (k) { return k; }));
     describe('commands should', function () {
         afterEach(function () {
             cordova.removeAllListeners('results');


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org