From 5815a590a880a60a0842d980ed7d17322cc6c8f5 Mon Sep 17 00:00:00 2001 From: Leo Horie Date: Tue, 24 May 2016 23:18:11 -0400 Subject: [PATCH] test empty object --- docs/components.md | 2 +- querystring/tests/test-parseQueryString.js | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/docs/components.md b/docs/components.md index 6359433b..ed5ee692 100644 --- a/docs/components.md +++ b/docs/components.md @@ -139,7 +139,7 @@ m(ComponentUsingThis, {text: "Hello"}) //
Hello
``` -Be aware that when using ES5 functions, the value of `this` in nested anonymous functions is not the component instance. There are two recommended ways to get around this Javascript limitation, use ES6 arrow functions, if ES6 is not available, use `vnode.state`. +Be aware that when using ES5 functions, the value of `this` in nested anonymous functions is not the component instance. There are two recommended ways to get around this Javascript limitation, use ES6 arrow functions, or if ES6 is not available, use `vnode.state`. --- diff --git a/querystring/tests/test-parseQueryString.js b/querystring/tests/test-parseQueryString.js index 8d3c100a..89e78ada 100644 --- a/querystring/tests/test-parseQueryString.js +++ b/querystring/tests/test-parseQueryString.js @@ -8,6 +8,10 @@ o.spec("parseQueryString", function() { var data = parseQueryString("?aaa=bbb") o(data).deepEquals({aaa: "bbb"}) }) + o("parses empty string", function() { + var data = parseQueryString("") + o(data).deepEquals({}) + }) o("parses flat object", function() { var data = parseQueryString("?a=b&c=d") o(data).deepEquals({a: "b", c: "d"})