html-to-xlsx
Advanced tools
Comparing version 0.3.2 to 0.3.3
@@ -55,5 +55,5 @@ var path = require("path"), | ||
if (options.strategy === "phantom-server") | ||
return require("./phantomWebServerStrategy.js")(options, html, id, icb); | ||
return require("./serverStrategy.js")(options, html, id, icb); | ||
if (options.strategy === "dedicated-process") | ||
return require("./phantomScriptStrategy.js")(options, html, id, icb); | ||
return require("./dedicatedProcessStrategy.js")(options, html, id, icb); | ||
@@ -60,0 +60,0 @@ cb(new Error("Unsupported strategy " + options.strategy)); |
{ | ||
"name": "html-to-xlsx", | ||
"version": "0.3.2", | ||
"version": "0.3.3", | ||
"author": { | ||
@@ -31,3 +31,4 @@ "name": "Jan Blaha", | ||
"scripts": { | ||
"test": "mocha test/test.js" | ||
"test": "node lib/prepareScripts.js && mocha test/test.js", | ||
"postinstall": "node lib/prepareScripts.js" | ||
}, | ||
@@ -34,0 +35,0 @@ "main": "index.js", |
@@ -5,4 +5,4 @@ var should = require("should"), | ||
tmpDir = path.join(__dirname, "temp"), | ||
phantomServerStrategy = require("../lib/phantomWebServerStrategy.js"), | ||
dedicatedProcessStrategy = require("../lib/phantomScriptStrategy.js"); | ||
phantomServerStrategy = require("../lib/serverStrategy.js"), | ||
dedicatedProcessStrategy = require("../lib/dedicatedProcessStrategy.js"); | ||
@@ -132,2 +132,17 @@ describe("html extraction", function () { | ||
}); | ||
it("should work for long tables", function (done) { | ||
this.timeout(7000); | ||
var rows = ""; | ||
for (var i = 0; i < 10000; i++) { | ||
rows += "<tr><td>1</td></tr>" | ||
} | ||
strategy(options, "<table>" + rows + "</table>", "", function (err, table) { | ||
if (err) | ||
return done(err); | ||
table.rows.should.have.length(10000); | ||
done(); | ||
}); | ||
}); | ||
} | ||
@@ -134,0 +149,0 @@ }); |
Sorry, the diff of this file is not supported yet
Install scripts
Supply chain riskInstall scripts are run when the package is installed. The majority of malware in npm is hidden in install scripts.
Found 1 instance in 1 package
14
21994
1
6