diff options
author | Filipe David Borba Manana <fdmanana@apache.org> | 2010-09-16 17:47:29 +0000 |
---|---|---|
committer | Filipe David Borba Manana <fdmanana@apache.org> | 2010-09-16 17:47:29 +0000 |
commit | 307029fd0dc4886092f9196c275a71c3d8a32220 (patch) | |
tree | f6d13682fbc2375b712470b7914fa088d8518ab6 /share/www/script/test/reduce_builtin.js | |
parent | 6cc96f2ac7b2dfa04b57d5523cfe6c8b0b6c083b (diff) |
JavaScript test files: adding missing semi-colons (Chrome is sensitive about them, but they're not mandatory according to ECMAScript spec) and removing extra commas.
git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@997862 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'share/www/script/test/reduce_builtin.js')
-rw-r--r-- | share/www/script/test/reduce_builtin.js | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/share/www/script/test/reduce_builtin.js b/share/www/script/test/reduce_builtin.js index 7b8207ad..b3cc3cc7 100644 --- a/share/www/script/test/reduce_builtin.js +++ b/share/www/script/test/reduce_builtin.js @@ -16,7 +16,7 @@ couchTests.reduce_builtin = function(debug) { db.createDb(); if (debug) debugger; - var numDocs = 500 + var numDocs = 500; var docs = makeDocs(1,numDocs + 1); db.bulkSave(docs); @@ -28,13 +28,14 @@ couchTests.reduce_builtin = function(debug) { acc += i*i; } return acc; - } + }; // this is the same test as the reduce.js test // only we'll let CouchDB run reduce in Erlang var map = function (doc) { emit(doc.integer, doc.integer); - emit(doc.integer, doc.integer)}; + emit(doc.integer, doc.integer); + }; var result = db.query(map, "_sum"); T(result.rows[0].value == 2*summate(numDocs)); @@ -115,7 +116,7 @@ couchTests.reduce_builtin = function(debug) { T(db.info().doc_count == ((i - 1) * 10 * 11) + ((j + 1) * 11)); } - map = function (doc) {emit(doc.keys, 1)}; + map = function (doc) { emit(doc.keys, 1); }; // with emitted values being 1, count should be the same as sum var builtins = ["_sum", "_count"]; @@ -150,7 +151,7 @@ couchTests.reduce_builtin = function(debug) { T(equals(results.rows[6], {key:["d","c"],value:10*i})); }; - map = function (doc) {emit(doc.keys, [1, 1])}; + map = function (doc) { emit(doc.keys, [1, 1]); }; var results = db.query(map, "_sum", {group:true}); T(equals(results.rows[0], {key:["a"],value:[20*i,20*i]})); |