diff --git a/tests/mithril-tests.js b/tests/mithril-tests.js index 041b5331..8dc1f383 100644 --- a/tests/mithril-tests.js +++ b/tests/mithril-tests.js @@ -3832,7 +3832,10 @@ function testMithril(mock) { var args = m.route.parseQueryString("foo=bar&hello=world&hello=mars&bam=&yup") return args.foo === "bar" && args.hello[0] === "world" && args.hello[1] === "mars" && args.bam === "" && args.yup === null }) - + test(function() { + var args = m.route.parseQueryString("") + return Object.keys(args).length === 0 + }) //m.route.buildQueryString test(function() { var string = m.route.buildQueryString({ @@ -3847,7 +3850,10 @@ function testMithril(mock) { }) return string === "foo=bar&hello=world&hello=mars&world%5Btest%5D=3&bam=&yup" }) - + test(function() { + var string = m.route.buildQueryString({}); + return string === "" + }) //m.prop test(function() { var prop = m.prop("test")