sheetjs_sheetjs/tests/make_fixtures.js
William Law 8ecbf4dc97
browser test cleanup (#2039)
* browser test cleanup

* add cases to core.js

* apply feedback
2020-07-02 12:57:21 -07:00

17 lines
507 B
JavaScript

#!/usr/bin/env node
var fs = require('fs');
var paths = fs.readFileSync('tests/fixtures.lst','utf-8').replace(/\r/g,"").split("\n");
var aux = [
'multiformat.lst',
'./misc/ssf.json',
'./test_files/biff5/number_format_greek.xls'
]
var fullpaths = paths.concat(aux);
fs.writeFileSync('tests/fixtures.js',
fullpaths.map(function(x) {
return [x, fs.existsSync(x) ? fs.readFileSync(x).toString('base64') : ""]
}).map(function(w) {
return "fs['" + w[0] + "'] = '" + w[1] + "';\n";
}).join("")
);