Browse Source

Fix linting errors

pull/745/head
Duc Tri Le 6 years ago
parent
commit
8a2cda0fd6
  1. 9
      tests/test-cases.js

9
tests/test-cases.js

@ -1904,7 +1904,6 @@ var CUSTOM_TESTS = [
expected: ["SembCorp Industries Ltd", "Singapore", "SCIL.SI", "10%", "Yes", "0.30%"], expected: ["SembCorp Industries Ltd", "Singapore", "SCIL.SI", "10%", "Yes", "0.30%"],
run: function(callback) { run: function(callback) {
var chunkNum = 0; var chunkNum = 0;
var actual = [];
Papa.parse(BASE_PATH + "duplicate.csv", { Papa.parse(BASE_PATH + "duplicate.csv", {
download: true, download: true,
chunkSize: 250000, chunkSize: 250000,
@ -1931,7 +1930,6 @@ var CUSTOM_TESTS = [
expected: ["SembCorp Industries Ltd", "Singapore", "SCIL.SI", "10%", "Yes", "0.30%"], expected: ["SembCorp Industries Ltd", "Singapore", "SCIL.SI", "10%", "Yes", "0.30%"],
run: function(callback) { run: function(callback) {
var chunkNum = 0; var chunkNum = 0;
var actual = [];
// A little bit of a hack but this allows us to test the FileStreamer for local files. Essentially, this uses the // A little bit of a hack but this allows us to test the FileStreamer for local files. Essentially, this uses the
// AJAX request to get the full content and fake the local file. // AJAX request to get the full content and fake the local file.
@ -1953,7 +1951,7 @@ var CUSTOM_TESTS = [
callback(new Error("Should have more than 2 chunks")); callback(new Error("Should have more than 2 chunks"));
} }
}); });
} };
xhr.open("GET", BASE_PATH + "duplicate.csv"); xhr.open("GET", BASE_PATH + "duplicate.csv");
try { try {
@ -1972,16 +1970,13 @@ var CUSTOM_TESTS = [
expected: ["SembCorp Marine Ltd", "Singapore", "SCMN.SI", "15%", "Yes", "0.30%"], expected: ["SembCorp Marine Ltd", "Singapore", "SCMN.SI", "15%", "Yes", "0.30%"],
run: function(callback) { run: function(callback) {
var chunkNum = 0; var chunkNum = 0;
var actual = [];
// Same hack for testing FileStreamer but this time, we just provide the content // Same hack for testing FileStreamer but this time, we just provide the content
var xhr = new XMLHttpRequest(); var xhr = new XMLHttpRequest();
xhr.onload = function() { xhr.onload = function() {
debugger;
Papa.parse(xhr.responseText, { Papa.parse(xhr.responseText, {
chunkSize: 250000, chunkSize: 250000,
chunk: function(results, parser) { chunk: function(results, parser) {
debugger;
chunkNum++; chunkNum++;
parser.pause(); parser.pause();
@ -1995,7 +1990,7 @@ var CUSTOM_TESTS = [
callback(new Error("Should have more than 2 chunks")); callback(new Error("Should have more than 2 chunks"));
} }
}); });
} };
xhr.open("GET", BASE_PATH + "duplicate.csv"); xhr.open("GET", BASE_PATH + "duplicate.csv");
try { try {

Loading…
Cancel
Save