Browse Source

test-cases: require() necessary test dependencies if running on NodeJS

pull/233/head
Tobias Bieniek 10 years ago
parent
commit
212ee33f5c
  1. 3
      package.json
  2. 5
      tests/test-cases.js

3
package.json

@ -41,6 +41,7 @@ @@ -41,6 +41,7 @@
],
"main": "papaparse.js",
"devDependencies": {
"chai": "^3.0.0",
"connect": "^3.3.3",
"grunt": "^0.4.5",
"grunt-contrib-uglify": "^0.6.0",
@ -53,7 +54,7 @@ @@ -53,7 +54,7 @@
"scripts": {
"test-browser": "node tests/test.js",
"test-phantomjs": "node tests/test.js --phantomjs",
"test-node": "mocha tests/node-tests.js",
"test-node": "mocha tests/node-tests.js tests/test-cases.js",
"test": "npm run test-node && npm run test-phantomjs"
}
}

5
tests/test-cases.js

@ -1,3 +1,8 @@ @@ -1,3 +1,8 @@
if (typeof module !== 'undefined' && module.exports) {
var chai = require('chai');
var Papa = require('../papaparse.js');
}
var assert = chai.assert;
var RECORD_SEP = String.fromCharCode(30);

Loading…
Cancel
Save