[Groonga-commit] groonga/express-kotoumi [master] Define mocked "on" method for extra commands

Back to archive index

YUKI Hiroshi null+****@clear*****
Mon Jan 21 17:43:06 JST 2013


YUKI Hiroshi	2013-01-21 17:43:06 +0900 (Mon, 21 Jan 2013)

  New Revision: ee910a94db30fbf260251a7cc3b8253455e17e88
  https://github.com/groonga/express-kotoumi/commit/ee910a94db30fbf260251a7cc3b8253455e17e88

  Log:
    Define mocked "on" method for extra commands

  Modified files:
    test/express-adaptor.test.js
    test/socket-api.test.js

  Modified: test/express-adaptor.test.js (+2 -1)
===================================================================
--- test/express-adaptor.test.js    2013-01-21 17:36:32 +0900 (7a6fee0)
+++ test/express-adaptor.test.js    2013-01-21 17:43:06 +0900 (4e47707)
@@ -23,11 +23,12 @@ suite('Adaption for express application', function() {
     };
 
     var server;
+
     teardown(function() {
       if (server) {
         server.close();
+        server = undefined;
       }
-      server = undefined;
     });
 
     test('to the document root', function(done) {

  Modified: test/socket-api.test.js (+4 -0)
===================================================================
--- test/socket-api.test.js    2013-01-21 17:36:32 +0900 (6f1df0d)
+++ test/socket-api.test.js    2013-01-21 17:43:06 +0900 (8f1f18e)
@@ -95,7 +95,11 @@ suite('Socket.IO API', function() {
   });
 
   test('front to back, extra command', function(done) {
+    var extraController = {};
     var connection = utils.createMockedBackendConnection()
+          .mock('on')
+            .takes('message', function() {})
+            .ctrl(1, extraController)
           .mock('emitMessage')
             .takes('foobar', { requestMessage: true });
 
-------------- next part --------------
HTML����������������������������...
Download 



More information about the Groonga-commit mailing list
Back to archive index