sheetjs-clone/test/valid.js
SheetJS d273a28d54 version bump 0.9.2: more formats
- do not consume trailing currency symbol (fixes #19 h/t @wilg)
- detect minutes following absolute hour (fixes #23 h/t @tedbeer)
- verify the miscellaneous formats (fixes #27 h/t @reviewher)
2017-05-07 23:49:05 -04:00

20 lines
527 B
JavaScript

/* vim: set ts=2: */
/*jshint loopfunc:true, mocha:true, node:true */
var SSF = require('../');
var fs = require('fs');
var data = fs.readFileSync('./test/valid.tsv','utf8').split("\n");
var _data = [0, 1, -2, 3.45, -67.89, "foo"];
function doit(d) {
it(d[0], function() {
for(var w = 0; w < _data.length; ++w) {
SSF.format(d[0], _data[w]);
}
});
}
describe('valid formats', function() {
for(var j=0;j<data.length;++j) {
if(!data[j]) return;
doit(data[j].replace(/#{255}/g,"").split("\t"));
}
});