cordova-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bra...@apache.org
Subject git commit: Fix broken tests for platform ls after my recent change.
Date Tue, 03 Sep 2013 20:10:49 GMT
Updated Branches:
  refs/heads/master 66f15d23f -> 16be5589e


Fix broken tests for platform ls after my recent change.


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

Branch: refs/heads/master
Commit: 16be5589ee17242e2ba71c1dd5c4c1a623ffc025
Parents: 66f15d2
Author: Braden Shepherdson <braden.shepherdson@gmail.com>
Authored: Tue Sep 3 16:10:30 2013 -0400
Committer: Braden Shepherdson <braden.shepherdson@gmail.com>
Committed: Tue Sep 3 16:10:30 2013 -0400

----------------------------------------------------------------------
 spec/platform.spec.js | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/16be5589/spec/platform.spec.js
----------------------------------------------------------------------
diff --git a/spec/platform.spec.js b/spec/platform.spec.js
index 0ec7954..fb1fbb1 100644
--- a/spec/platform.spec.js
+++ b/spec/platform.spec.js
@@ -101,14 +101,14 @@ describe('platform command', function() {
             expect(is_cordova).toHaveBeenCalled();
         });
 
-        describe('`ls`', function() { 
+        describe('`ls`', function() {
             afterEach(function() {
                 cordova.removeAllListeners('results');
             });
             it('should list out no platforms for a fresh project', function(done) {
                 list_platforms.andReturn([]);
                 cordova.on('results', function(res) {
-                    expect(res).toEqual('No platforms added. Use `cordova platform add <platform>`.');
+                    expect(res).toMatch(/^Installed platforms:\s*Available platforms:.*$/);
                     done();
                 });
                 cordova.platform('list');
@@ -116,7 +116,7 @@ describe('platform command', function() {
 
             it('should list out added platforms in a project', function(done) {
                 cordova.on('results', function(res) {
-                    expect(res.length).toEqual(5);
+                    expect(res).toMatch(/^Installed platforms: ios, android, wp7, wp8, blackberry10\s*Available
platforms:\s*$/);
                     done();
                 });
                 cordova.platform('list');


Mime
View raw message