mirror of
https://github.com/apache/cordova-android.git
synced 2026-04-04 00:02:03 +08:00
CB-12640: flipped avd parsing logic so that it always tries to use avdmanager to retrieve avds first, then falls back to android command if avdmanager cannot be found (and errors with ENOENT). updated tests - and added explicit tests to ensure to shell out to singular forms of sub-commands when executing android
This commit is contained in:
@@ -26,6 +26,12 @@ var Q = require("q");
|
||||
|
||||
describe("android_sdk", function () {
|
||||
describe("list_targets_with_android", function() {
|
||||
it("should invoke `android` with the `list target` command and _not_ the `list targets` command, as the plural form is not supported in some Android SDK Tools versions", function() {
|
||||
var deferred = Q.defer();
|
||||
spyOn(superspawn, "spawn").and.returnValue(deferred.promise);
|
||||
android_sdk.list_targets_with_android();
|
||||
expect(superspawn.spawn).toHaveBeenCalledWith("android", ["list", "target"]);
|
||||
});
|
||||
it("should parse and return results from `android list targets` command", function(done) {
|
||||
var deferred = Q.defer();
|
||||
spyOn(superspawn, "spawn").and.returnValue(deferred.promise);
|
||||
|
||||
Reference in New Issue
Block a user