From 68e3a6d8036e2c58edd5c242035d1585793b508c Mon Sep 17 00:00:00 2001 From: Tijs Zwinkels Date: Mon, 19 Sep 2016 16:48:55 +0200 Subject: [PATCH] header: option for unparse - Test --- tests/test-cases.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tests/test-cases.js b/tests/test-cases.js index 9dda6ff..4485808 100644 --- a/tests/test-cases.js +++ b/tests/test-cases.js @@ -1152,6 +1152,12 @@ var UNPARSE_TESTS = [ description: "JSON null is treated as empty value", input: [{ "Col1": "a", "Col2": null, "Col3": "c" }], expected: 'Col1,Col2,Col3\r\na,,c' + }, + { + description: "Don't print header if header:false option specified", + input: [{ "Col1": "a", "Col2": "b", "Col3": "c" }, { "Col1": "d", "Col2": "e", "Col3": "f" }], + config: { header: false }, + expected: 'a,b,c\r\nd,e,f' } ];