Comparing version 0.3.1 to 0.3.2
{ | ||
"name": "j", | ||
"version": "0.3.1", | ||
"version": "0.3.2", | ||
"author": "sheetjs", | ||
@@ -13,3 +13,3 @@ "description": "data wrangler", | ||
"xlsjs": "~0.6.18", | ||
"xlsx": "~0.7.1", | ||
"xlsx": "~0.7.2", | ||
"commander":"" | ||
@@ -16,0 +16,0 @@ }, |
58
test.js
@@ -41,6 +41,6 @@ /* j -- (C) 2013-2014 SheetJS -- http://sheetjs.com */ | ||
it.skip('should round-trip XLSB', x.substr(-8) == ".pending" || x.substr(-8) == ".nowrite" ? null : function() { | ||
/*it.skip('should round-trip XLSB', x.substr(-8) == ".pending" || x.substr(-8) == ".nowrite" ? null : function() { | ||
fs.writeFileSync(dir + x + "__.xlsb", J.utils.to_xlsb(wb, {})); | ||
wbxlsb = J.readFile(dir + x + "__.xlsb", opts); | ||
}); | ||
});*/ | ||
}); | ||
@@ -53,23 +53,39 @@ }); | ||
var mft = fs.readFileSync('multiformat.lst','utf-8').split("\n"); | ||
mft.forEach(function(x) { if(x[0]!="#") describe('MFT ' + x, function() { | ||
var fil = {}, f = [], r = x.split(/\s+/); | ||
if(r.length < 3) return; | ||
it('should parse all', function() { | ||
for(var j = 1; j != r.length; ++j) f[j-1] = J.readFile(dir + r[0] + r[j], mfopts); | ||
}); | ||
it('should have the same sheetnames', function() { | ||
cmparr(f.map(function(x) { return x[1].SheetNames; })); | ||
}); | ||
it('should have the same ranges', function() { | ||
f[0][1].SheetNames.forEach(function(s) { | ||
var ss = f.map(function(x) { return x[1].Sheets[s]; }); | ||
cmparr(ss.map(function(s) { return s['!ref']; })); | ||
var csv = true; | ||
mft.forEach(function(x) { | ||
if(x[0]!="#") describe('MFT ' + x, function() { | ||
var fil = {}, f = [], r = x.split(/\s+/); | ||
if(r.length < 3) return; | ||
it('should parse all', function() { | ||
for(var j = 1; j != r.length; ++j) f[j-1] = J.readFile(dir + r[0] + r[j], mfopts); | ||
}); | ||
}); | ||
it('should have the same merges', function() { | ||
f[0][1].SheetNames.forEach(function(s) { | ||
var ss = f.map(function(x) { return x[1].Sheets[s]; }); | ||
cmparr(ss.map(function(s) { return (s['!merges']||[]).map(function(y) { return J.XLS.utils.encode_range(y); }).sort(); })); | ||
it('should have the same sheetnames', function() { | ||
cmparr(f.map(function(x) { return x[1].SheetNames; })); | ||
}); | ||
it('should have the same ranges', function() { | ||
f[0][1].SheetNames.forEach(function(s) { | ||
var ss = f.map(function(x) { return x[1].Sheets[s]; }); | ||
cmparr(ss.map(function(s) { return s['!ref']; })); | ||
}); | ||
}); | ||
it('should have the same merges', function() { | ||
f[0][1].SheetNames.forEach(function(s) { | ||
var ss = f.map(function(x) { return x[1].Sheets[s]; }); | ||
cmparr(ss.map(function(s) { return (s['!merges']||[]).map(function(y) { return J.XLS.utils.encode_range(y); }).sort(); })); | ||
}); | ||
}); | ||
it('should have the same CSV', csv ? function() { | ||
cmparr(f.map(function(x) { return x[1].SheetNames; })); | ||
var names = f[0][1].SheetNames; | ||
names.forEach(function(name) { | ||
cmparr(f.map(function(x) { return J.utils.to_csv(x)[name]; })); | ||
}); | ||
} : null); | ||
}); | ||
}); }); | ||
else { | ||
x.split(/\s+/).forEach(function(w) { switch(w) { | ||
case "no-csv": csv = false; break; | ||
case "yes-csv": csv = true; break; | ||
}}); | ||
} | ||
}); |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
46681
226
Updatedxlsx@~0.7.2