summaryrefslogtreecommitdiff
path: root/share/www/script/test
diff options
context:
space:
mode:
authorJohn Christopher Anderson <jchris@apache.org>2010-09-12 09:01:47 +0000
committerJohn Christopher Anderson <jchris@apache.org>2010-09-12 09:01:47 +0000
commitc118442adb9f43dcd9bd70f4113cf91aaaa00ff1 (patch)
treec68eaea8558c069f795c4df16ef556a9f34a104a /share/www/script/test
parente9256caf158304f1d827d5f168ef4bfc9490d59f (diff)
additional test for non-circular commonjs require. closes COUCHDB-869
git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@996267 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'share/www/script/test')
-rw-r--r--share/www/script/test/design_docs.js7
1 files changed, 6 insertions, 1 deletions
diff --git a/share/www/script/test/design_docs.js b/share/www/script/test/design_docs.js
index 2e3e1db1..8864225c 100644
--- a/share/www/script/test/design_docs.js
+++ b/share/www/script/test/design_docs.js
@@ -58,7 +58,8 @@ function() {
},
shows: {
simple: "function() {return 'ok'};",
- requirey : "function() { var lib = require('whatever/commonjs/upper'); return lib.testing; };"
+ requirey : "function() { var lib = require('whatever/commonjs/upper'); return lib.testing; };",
+ circular : "function() { var lib = require('whatever/commonjs/upper'); return JSON.stringify(this); };"
}
};
@@ -88,6 +89,10 @@ function() {
T(xhr.status == 200);
TEquals("PLANKTONwhatever/commonjs/upperplankton", xhr.responseText);
+ var xhr = CouchDB.request("GET", "/test_suite_db/_design/test/_show/circular");
+ T(xhr.status == 200);
+ TEquals("javascript", JSON.parse(xhr.responseText).language);
+
// test that we get design doc info back
var dinfo = db.designInfo("_design/test");
TEquals("test", dinfo.name);