Skip to content

Commit 6ab2699

Browse files
committed
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.
1 parent 960855c commit 6ab2699

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

packages/members-csv/test/unparse.test.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ const should = require('should');
22
const {unparse} = require('../index');
33

44
describe('unparse', function () {
5-
it('serializes json to CSV and adds standard members fields', async function () {
5+
it('serializes json to CSV and adds standard members fields with no explicit columns parameter', async function () {
66
const json = [{
77
88
name: 'Sam Memberino',
@@ -23,7 +23,9 @@ describe('unparse', function () {
2323
subscribed: false
2424
}];
2525

26-
const columns = Object.keys(json[0]);
26+
const columns = [
27+
'email', 'subscribed'
28+
];
2729

2830
const result = unparse(json, columns);
2931

0 commit comments

Comments
 (0)