aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorMatěj Cepl <mcepl@redhat.com>2010-07-20 12:22:10 +0200
committerMatěj Cepl <mcepl@redhat.com>2010-07-20 12:22:10 +0200
commit0b74818ba503207595d56fa91c70ba3e83a481af (patch)
tree2b9bc1ebb709e76b369cd225611a440f7d919eb8 /tests
parent5405da4f392988c0d396afd33be049ae64045c63 (diff)
downloadbugzilla-triage-0b74818ba503207595d56fa91c70ba3e83a481af.tar.gz
Add util.getObjectKeys for better diagnostic.
Diffstat (limited to 'tests')
-rw-r--r--tests/test-util.js14
1 files changed, 11 insertions, 3 deletions
diff --git a/tests/test-util.js b/tests/test-util.js
index c2214d6..54896ff 100644
--- a/tests/test-util.js
+++ b/tests/test-util.js
@@ -4,9 +4,6 @@
"use strict";
var util = require("util");
-var testString = "When in the Course of human events it becomes necessary for one people to dissolve the political bands which have connected them with another and to assume among the powers of the earth, the separate and equal station to which the Laws of Nature and of Nature's God entitle them, a decent respect to the opinions of mankind requires that they should declare the causes which impel them to the separation.\n";
-var pushkinTestString = "Byl pozdní večer první máj!\n\nАРИОН.\n\nНас было много на челне;\nИные парус напрягали,\nДругие дружно упирали\nВ глубь мощны веслы. В тишине\nНа руль склонясь, наш кормщик умный\nВ молчаньи правил грузный чолн;\nА я — беспечной веры полн —\nПловцам я пел … Вдруг лоно волн\nИзмял с налету вихорь шумный …\nПогиб и кормщик и пловец! –\nЛишь я, таинственный певец,\nНа берег выброшен грозою,\nЯ гимны прежние пою\nИ ризу влажную мою\nСушу на солнце под скалою.\n"
-
// testing util.heir
exports.ensureHeir = function (test) {
var fedlimid = {}, naoise = {};
@@ -169,4 +166,15 @@ exports.ensureCSVRemoveEmpty = function (test) {
exports.ensureGetBugNo = function (test) {
var bugNo = util.getBugNo("https://bugzilla.redhat.com/show_bug.cgi?id=597141");
test.assertEqual(bugNo, 597141, "getting bug number");
+};
+
+// testing util.getObjectKeys
+exports.ensureGetObjectKeys = function (test) {
+ var testObj = {
+ a: 1,
+ b: 2
+ };
+ test.assertEqual(JSON.stringify(util.getObjectKeys(testObj)),
+ JSON.stringify(["a","b"]),
+ "getting keys from a object");
}; \ No newline at end of file