cordova-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (CB-10628) Fix emulate android --target
Date Wed, 17 Feb 2016 20:16:18 GMT

    [ https://issues.apache.org/jira/browse/CB-10628?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15151091#comment-15151091
] 

ASF GitHub Bot commented on CB-10628:
-------------------------------------

Github user daserge commented on the pull request:

    https://github.com/apache/cordova-android/pull/260#issuecomment-185383888
  
    @vladimir-kotikov, addressed, thanks.
    @nikhilkh, I've tried to test private `getInstallTarget` with `rewire` but faced an issue
caused by the fact that the test-time directory structure differs from the run-time one (so
that `check-reqs` fails to load when rewire requires run -> emulator -> check_reqs):
    
    ```javascript
    var rewire = require("rewire");
    var run = rewire("../../bin/templates/cordova/lib/run");
    var getInstallTarget = run.__get__("getInstallTarget");
    
    describe("run", function () {
      describe("getInstallTarget", function() {
        var targetOpts = { target: "emu" };
        var deviceOpts = { device: true };
        var emulatorOpts = { emulator: true };
        var emptyOpts = {};
    
        it("should select correct target based on the run opts", function() {
            expect(getInstallTarget(targetOpts)).toBe("emu");
            expect(getInstallTarget(deviceOpts)).toBe("--device");
            expect(getInstallTarget(emulatorOpts)).toBe("--emulator");
            expect(getInstallTarget(emptyOpts)).toBeUndefined();
        });
      });
    });
    ```


> Fix emulate android --target
> ----------------------------
>
>                 Key: CB-10628
>                 URL: https://issues.apache.org/jira/browse/CB-10628
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: Android
>            Reporter: Sergey Shakhnazarov
>            Assignee: Sergey Shakhnazarov
>              Labels: regression
>
> {noformat}
> λ cordova emulate android --target=a19
> ANDROID_HOME=e:\Android\Sdk
> JAVA_HOME=C:\Program Files (x86)\java\jdk1.7.0_55
> No emulator specified, defaulting to Nexus_5_API_23_x86
> {noformat}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

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


Mime
View raw message