Browse Source

adding comment

pull/542/head
jaymeans 7 years ago
parent
commit
769935f440
  1. 5
      tests/test-cases.js

5
tests/test-cases.js

@ -1329,7 +1329,10 @@ describe('Parse Tests', function() { @@ -1329,7 +1329,10 @@ describe('Parse Tests', function() {
function generateTest(test) {
(test.disabled ? it.skip : it)(test.description, function() {
var actual = Papa.parse(test.input, test.config);
test.expected.meta && assert.deepEqual(actual.meta, test.expected.meta);
// allows for testing the meta object if present in the test
if (test.expected.meta) {
assert.deepEqual(actual.meta, test.expected.meta);
}
assert.deepEqual(JSON.stringify(actual.errors), JSON.stringify(test.expected.errors));
assert.deepEqual(actual.data, test.expected.data);
});

Loading…
Cancel
Save