cordova-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From an-s...@apache.org
Subject cordova-lib git commit: CB-10465 Pass correct options to prepare from compile
Date Wed, 03 Feb 2016 14:31:19 GMT
Repository: cordova-lib
Updated Branches:
  refs/heads/master 540a623bb -> b1bdd5569


CB-10465 Pass correct options to prepare from compile


Project: http://git-wip-us.apache.org/repos/asf/cordova-lib/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-lib/commit/b1bdd556
Tree: http://git-wip-us.apache.org/repos/asf/cordova-lib/tree/b1bdd556
Diff: http://git-wip-us.apache.org/repos/asf/cordova-lib/diff/b1bdd556

Branch: refs/heads/master
Commit: b1bdd55690165ea75e0217c9ebf78b6e41257aad
Parents: 540a623
Author: Vladimir Kotikov <v-vlkoti@microsoft.com>
Authored: Wed Feb 3 16:55:31 2016 +0300
Committer: Vladimir Kotikov <v-vlkoti@microsoft.com>
Committed: Wed Feb 3 17:17:18 2016 +0300

----------------------------------------------------------------------
 cordova-lib/spec-cordova/emulate.spec.js | 6 +++---
 cordova-lib/src/cordova/emulate.js       | 2 +-
 2 files changed, 4 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-lib/blob/b1bdd556/cordova-lib/spec-cordova/emulate.spec.js
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-cordova/emulate.spec.js b/cordova-lib/spec-cordova/emulate.spec.js
index 4bf20b7..5cea968 100644
--- a/cordova-lib/spec-cordova/emulate.spec.js
+++ b/cordova-lib/spec-cordova/emulate.spec.js
@@ -65,7 +65,7 @@ describe('emulate command', function() {
     describe('success', function() {
         it('should run inside a Cordova-based project with at least one added platform and
call prepare and shell out to the emulate script', function(done) {
             cordova.raw.emulate(['android','ios']).then(function(err) {
-                expect(prepare_spy).toHaveBeenCalledWith(['android', 'ios']);
+                expect(prepare_spy).toHaveBeenCalledWith(jasmine.objectContaining({platforms:
['android', 'ios']}));
                 expect(getPlatformApi).toHaveBeenCalledWith('android');
                 expect(getPlatformApi).toHaveBeenCalledWith('ios');
                 expect(platformApi.run).toHaveBeenCalled();
@@ -75,7 +75,7 @@ describe('emulate command', function() {
         });
         it('should pass down options', function(done) {
             cordova.raw.emulate({platforms: ['ios'], options: {optionTastic: true }}).then(function(err)
{
-                expect(prepare_spy).toHaveBeenCalledWith(['ios']);
+                expect(prepare_spy).toHaveBeenCalledWith(jasmine.objectContaining({platforms:
['ios']}));
                 expect(getPlatformApi).toHaveBeenCalledWith('ios');
                 expect(platformApi.run).toHaveBeenCalledWith({ device: false, emulator: true,
optionTastic: true });
             })
@@ -89,7 +89,7 @@ describe('emulate command', function() {
 
             cordova.on('warn', warnSpy);
             cordova.raw.emulate({platforms:['ios'], options:['--optionTastic']}).then(function
() {
-                expect(prepare_spy).toHaveBeenCalledWith(['ios']);
+                expect(prepare_spy).toHaveBeenCalledWith(jasmine.objectContaining({platforms:
['ios']}));
                 expect(getPlatformApi).toHaveBeenCalledWith('ios');
                 expect(platformApi.run).toHaveBeenCalledWith(jasmine.objectContaining({emulator:
true, argv: ['--optionTastic']}));
             })

http://git-wip-us.apache.org/repos/asf/cordova-lib/blob/b1bdd556/cordova-lib/src/cordova/emulate.js
----------------------------------------------------------------------
diff --git a/cordova-lib/src/cordova/emulate.js b/cordova-lib/src/cordova/emulate.js
index 67dedeb..62810fc 100644
--- a/cordova-lib/src/cordova/emulate.js
+++ b/cordova-lib/src/cordova/emulate.js
@@ -33,7 +33,7 @@ module.exports = function emulate(options) {
     return hooksRunner.fire('before_emulate', options)
     .then(function() {
         // Run a prepare first!
-        return require('./cordova').raw.prepare(options.platforms);
+        return require('./cordova').raw.prepare(options);
     }).then(function() {
         // Deploy in parallel (output gets intermixed though...)
         return Q.all(options.platforms.map(function(platform) {


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


Mime
View raw message