YUKI Hiroshi
null+****@clear*****
Wed Jan 30 12:52:32 JST 2013
YUKI Hiroshi 2013-01-30 12:52:32 +0900 (Wed, 30 Jan 2013) New Revision: ad3e0a0d41d0b8f9530a2c2bb501bfd1a17c5376 https://github.com/groonga/express-kotoumi/commit/ad3e0a0d41d0b8f9530a2c2bb501bfd1a17c5376 Log: test: Add an expectation to a mocked connection about registerations of error handlers Modified files: test/test-utils.js Modified: test/test-utils.js (+9 -2) =================================================================== --- test/test-utils.js 2013-01-30 12:50:15 +0900 (f2c7688) +++ test/test-utils.js 2013-01-30 12:52:32 +0900 (130ec8d) @@ -142,9 +142,16 @@ function createMockedBackendConnection() { onMessageControllers[command] = {}; connection = connection .mock('on') - .takes('message', function() {}) - .ctrl(1, onMessageControllers[command]); + .takes('message', function() {}) + .ctrl(1, onMessageControllers[command]); }); + + onMessageControllers.error = {}; + connection = connection + .mock('on') + .takes('error', function() {}) + .ctrl(1, onMessageControllers.error); + connection.controllers = onMessageControllers; return connection; } -------------- next part -------------- HTML����������������������������... Download