removed localized test

This commit is contained in:
Ivan Socolsky 2014-12-03 18:21:12 -03:00
parent da89ba647b
commit e62f48e83e
1 changed files with 3 additions and 4 deletions

View File

@ -11,20 +11,19 @@ var moment = moment || require('moment');
describe('csv utils', function() {
it('should convert simple json', function(done) {
var data = [
{ name: 'Lennon John', age: 40, lastLogin: moment(1417608870000), },
{ name: 'Cobain, Kurt', age: 27, lastLogin: moment('2014-11-01'), },
{ name: 'Lennon John', age: 40 },
{ name: 'Cobain, Kurt', age: 27 },
];
var descriptor = {
columns: [
{ label: 'Name', property: 'name', type: 'string' },
{ label: 'Age', property: 'age', type: 'number' },
{ property: 'lastLogin', type: 'date' },
],
};
csv.toCsv(data, descriptor, function (err, res) {
res.should.equal('Name,Age,lastLogin\r\nLennon John,40,2014-12-03T09:14:30-03:00\r\n"Cobain, Kurt",27,2014-11-01T00:00:00-03:00\r\n');
res.should.equal('Name,Age\r\nLennon John,40\r\n"Cobain, Kurt",27\r\n');
done();
});
});