From 6c2d057e25c7a9ecbca17e71331434ef65dbe981 Mon Sep 17 00:00:00 2001 From: Naz Date: Fri, 21 Oct 2022 16:18:12 +0800 Subject: [PATCH] Improved readability of unparse test refs https://github.com/TryGhost/Team/issues/1076 - The column parameter has default behavior attached to it, so it is best to have it mentioned and used in an explicit way. --- ghost/members-csv/test/unparse.test.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/ghost/members-csv/test/unparse.test.js b/ghost/members-csv/test/unparse.test.js index 970c94b518..cea7b62dae 100644 --- a/ghost/members-csv/test/unparse.test.js +++ b/ghost/members-csv/test/unparse.test.js @@ -2,7 +2,7 @@ const should = require('should'); const {unparse} = require('../index'); describe('unparse', function () { - it('serializes json to CSV and adds standard members fields', async function () { + it('serializes json to CSV and adds standard members fields with no explicit columns parameter', async function () { const json = [{ email: 'email@example.com', name: 'Sam Memberino', @@ -23,7 +23,9 @@ describe('unparse', function () { subscribed: false }]; - const columns = Object.keys(json[0]); + const columns = [ + 'email', 'subscribed' + ]; const result = unparse(json, columns);