[Groonga-commit] groonga/express-droonga at d858f6c [master] test: compare messages length and content at a time

Back to archive index

Kouhei Sutou null+****@clear*****
Sat Jul 20 23:46:34 JST 2013


Kouhei Sutou	2013-07-20 23:46:34 +0900 (Sat, 20 Jul 2013)

  New Revision: d858f6c98599cbc8fc8429784d5a8600963f0b1b
  https://github.com/groonga/express-droonga/commit/d858f6c98599cbc8fc8429784d5a8600963f0b1b

  Message:
    test: compare messages length and content at a time

  Modified files:
    test/backend-connection.test.js

  Modified: test/backend-connection.test.js (+4 -6)
===================================================================
--- test/backend-connection.test.js    2013-07-20 23:43:35 +0900 (129cb12)
+++ test/backend-connection.test.js    2013-07-20 23:46:34 +0900 (dd25115)
@@ -482,12 +482,10 @@ suite('Connection', function() {
         .createBackend()
         .next(function(newBackend) {
           restartedBackend = newBackend;
-          assert.equal(backend.received.length,
-                       1,
-                       'no new message should be sent to the old backend' + JSON.stringify(backend.received));
-          assert.equal(restartedBackend.received.length,
-                       0,
-                       'message should be destroyed by socket error' + JSON.stringify(restartedBackend.received));
+          assert.deepEqual(extractTags(backend.received),
+                           ['test.message']);
+          assert.deepEqual(extractTags(restartedBackend.received),
+                           []);
 
           connection.emitMessage('test', { message: true });
         })
-------------- next part --------------
HTML����������������������������...
下载 



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