[Groonga-commit] groonga/express-kotoumi [master] Don't reuse pre-defined object for the base parameter

Back to archive index

YUKI Hiroshi null+****@clear*****
Wed Jan 16 15:57:21 JST 2013


YUKI Hiroshi	2013-01-16 15:57:21 +0900 (Wed, 16 Jan 2013)

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

  Log:
    Don't reuse pre-defined object for the base parameter

  Modified files:
    test/builders-rest-request.test.js

  Modified: test/builders-rest-request.test.js (+2 -2)
===================================================================
--- test/builders-rest-request.test.js    2013-01-16 15:42:05 +0900 (1c41300)
+++ test/builders-rest-request.test.js    2013-01-16 15:57:21 +0900 (484a207)
@@ -64,7 +64,7 @@ suite('building message from REST API request', function() {
       function testSuccessFor(key, value, params) {
         test(key + '=' + value + '(success)', function() {
           assert.doesNotThrow(function() {
-            params = params || {};
+            params = Object.create(params || {});
             params[key] = value;
             builders.search({ params: params });
           });
@@ -74,7 +74,7 @@ suite('building message from REST API request', function() {
       function testFailFor(key, value, params, errorMessage) {
         test(key + '=' + value + '(fail)', function() {
           assert.throws(function() {
-            params = params || {};
+            params = Object.create(params || {});
             params[key] = value;
             builders.search({ params: params });
           }, errorMessage);
-------------- next part --------------
HTML����������������������������...
Download 



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