From 58005ec4446d928f4d92a8cc99eb0024af0ca965 Mon Sep 17 00:00:00 2001 From: Eduardo San Martin Morote Date: Wed, 5 Feb 2020 12:44:30 +0100 Subject: [PATCH] test: null values in queries --- __tests__/stringifyQuery.spec.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/__tests__/stringifyQuery.spec.ts b/__tests__/stringifyQuery.spec.ts index a03341e6..de221c37 100644 --- a/__tests__/stringifyQuery.spec.ts +++ b/__tests__/stringifyQuery.spec.ts @@ -13,6 +13,11 @@ describe('stringifyQuery', () => { expect(stringifyQuery({ e: null, b: null })).toEqual('e&b') }) + it('stringifies null values in arrays', () => { + expect(stringifyQuery({ e: [null] })).toEqual('e') + expect(stringifyQuery({ e: [null, 'c'] })).toEqual('e&e=c') + }) + it('stringifies numbers', () => { expect(stringifyQuery({ e: 2 })).toEqual('e=2') expect(stringifyQuery({ e: [2, 'b'] })).toEqual('e=2&e=b') -- 2.47.3