Permalink
Browse files

add tests for mojito start port args

  • Loading branch information...
1 parent 113621a commit c17ecf88c270533bb93f1d385a74b8800003a6b2 @isao isao committed Mar 20, 2013
Showing with 28 additions and 0 deletions.
  1. +28 −0 tests/unit/lib/app/commands/test-start.js
@@ -84,6 +84,34 @@ YUI().use('mojito', 'mojito-test-extra', 'test', function(Y) {
A.areSame(8667, port);
},
+ 'test run start string port': function() {
+ A.areSame(0, listenCalls);
+ start.run(['8888'], null, function() {});
+ A.areSame(1, listenCalls);
+ A.areSame(8888, port);
+ },
+
+ 'test run start funny string port': function() {
+ A.areSame(0, listenCalls);
+ start.run(['07777a.bc'], null, function() {});
+ A.areSame(1, listenCalls);
+ A.areSame(7777, port);
+ },
+
+ 'test run start port is "foo"': function() {
+ A.areSame(0, listenCalls);
+ start.run(['foo'], null, function() {});
+ A.areSame(1, listenCalls);
+ A.areSame(8666, port);
+ },
+
+ 'test run start with args ["app", "."]': function() {
+ A.areSame(0, listenCalls);
+ start.run(["app", "."], null, function() {});
+ A.areSame(1, listenCalls);
+ A.areSame(8666, port);
+ },
+
'test run start context': function() {
var options = {
context: "environment:production"

0 comments on commit c17ecf8

Please sign in to comment.