Browse Source

Added test to check working of quoteDataWithSpaces option

pull/836/head
AkvelonAccount 4 years ago
parent
commit
ab42a04fe8
  1. 7
      tests/test-cases.js

7
tests/test-cases.js

@ -1881,6 +1881,13 @@ var UNPARSE_TESTS = [ @@ -1881,6 +1881,13 @@ var UNPARSE_TESTS = [
config: { escapeFormulae: true, quotes: true, quoteChar: "'", escapeChar: "'" },
expected: '\'Col1\',\'Col2\',\'Col3\'\r\n\'\'\'=danger\',\'\'\'@danger\',\'safe\'\r\n\'safe=safe\',\'\'\'+danger\',\'\'\'-danger, danger\'\r\n\'\'\'+safe\',\'\'\'@safe\',\'safe, safe\''
},
{
description: "Use quoteDataWithSpaces set to false",
notes: "Papa should not add quotes to data with spaces in the start or in the end)",
input: { data: ["abc", "d", " ef "] },
config: { quoteDataWithSpaces: false },
expected: 'abc,d, ef '
},
];
describe('Unparse Tests', function() {

Loading…
Cancel
Save