Skip to content

Commit

Permalink
moved comment
Browse files Browse the repository at this point in the history
  • Loading branch information
trescube committed Jul 7, 2017
1 parent 32710cc commit 2ee48b9
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions test/document/toESDocument.js
Original file line number Diff line number Diff line change
Expand Up @@ -77,17 +77,17 @@ module.exports.tests.toESDocument = function(test) {
};

t.deepEqual(esDoc, expected, 'creates correct elasticsearch document');

// test that empty arrays/object are stripped from the doc before sending it
// downstream to elasticsearch.
t.end();

});

test('unset properties should not output in toESDocument', (t) => {
const Document = proxyquire('../../Document', { 'pelias-config': fakeConfig });

const esDoc = new Document('mysource','mylayer','myid').toESDocument();

// test that empty arrays/object are stripped from the doc before sending it
// downstream to elasticsearch.
t.false(esDoc.data.hasOwnProperty('address_parts'), 'does not include empty top-level maps');
t.false(esDoc.data.hasOwnProperty('category'), 'does not include empty top-level arrays');
t.false(esDoc.data.hasOwnProperty('parent'), 'does not include empty parent arrays');
Expand Down

0 comments on commit 2ee48b9

Please sign in to comment.