You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cordova.apache.org by "Souvik Maji (JIRA)" <ji...@apache.org> on 2018/08/04 17:30:00 UTC

[jira] [Created] (CB-14254) Cannot add plugin tests of any cordova plugin

Souvik Maji created CB-14254:
--------------------------------

             Summary: Cannot add plugin tests of any cordova plugin
                 Key: CB-14254
                 URL: https://issues.apache.org/jira/browse/CB-14254
             Project: Apache Cordova
          Issue Type: Bug
          Components: cordova-fetch
    Affects Versions: cordova@7.0.0
         Environment: Mac Os X High Sierra.

npm version: 6.2.0

cordova version: 8.0.0

 
            Reporter: Souvik Maji


If I am trying to run the unit tests of any plugin (e.g cordova-plugin-geolocation), I have to add the tests subdirectory of the plugin in my project. While adding the tests subdirectory of a remote project, I am getting a `*support for subdirectories is deprecated and will be removed in Cordova@7*` error. The command I am trying to use to add the tests is 

`cordova plugin add https://github.com/paypermint/payabbhi-cordova#:/tests`.

If fetch does not support adding subdirectories, How can someone add the unit tests of a plugin in his project? The error and the stack trace is shown below:

```

(node:57857) UnhandledPromiseRejectionWarning: CordovaError: --fetch does not support subdirectories

    at Object.fetchPlugin [as fetch] (/usr/local/lib/node_modules/cordova/node_modules/cordova-lib/src/plugman/fetch.js:71:37)

    at /usr/local/lib/node_modules/cordova/node_modules/cordova-lib/src/cordova/plugin/add.js:98:40

    at _fulfilled (/usr/local/lib/node_modules/cordova/node_modules/cordova-lib/node_modules/q/q.js:787:54)

    at /usr/local/lib/node_modules/cordova/node_modules/cordova-lib/node_modules/q/q.js:816:30

    at Promise.promise.promiseDispatch (/usr/local/lib/node_modules/cordova/node_modules/cordova-lib/node_modules/q/q.js:749:13)

    at /usr/local/lib/node_modules/cordova/node_modules/cordova-lib/node_modules/q/q.js:810:14

    at flush (/usr/local/lib/node_modules/cordova/node_modules/cordova-lib/node_modules/q/q.js:108:17)

    at process._tickCallback (internal/process/next_tick.js:61:11)

    at Function.Module.runMain (internal/modules/cjs/loader.js:745:11)

    at startup (internal/bootstrap/node.js:266:19)

(node:57857) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)

(node:57857) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.```

 

Adding the `--nofetch` flag, does not resolve the issue either. Is cloning the project and using the location of the test directory to add to the project, the only option I have?

 



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

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