[ 
https://issues.apache.org/jira/browse/CB-14254?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Souvik Maji updated CB-14254:
-----------------------------
    Description: 
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 
http://git-wip-us.apache.org/repos/asf/cordova-plugin-geolocation#:/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?

 

  was:
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?

 


> 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: [email protected]
>         Environment: Mac Os X High Sierra.
> npm version: 6.2.0
> cordova version: 8.0.0
>  
>            Reporter: Souvik Maji
>            Priority: Critical
>              Labels: CI, features, test
>
> 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 
> http://git-wip-us.apache.org/repos/asf/cordova-plugin-geolocation#:/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: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to