mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-11-23 22:11:09 +03:00
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.
This commit is contained in:
parent
6c9f8ec32d
commit
6c2d057e25
@ -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);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user