jquery-csv icon indicating copy to clipboard operation
jquery-csv copied to clipboard

Project unit testing no longer working with jquery-csv 0.8.9

Open wschmrdrNS opened this issue 8 years ago • 1 comments

When attempting to run unit tests for a project via grunt-contrib-qunit where the project has jquery-csv 0.8.9 as a dependency, the following is now being received:

PhantomJS error: ReferenceError: Can't find variable: require [ { file: 'path/to/file', line: ##, function: 'global code' } ] PhantomJS error: ReferenceError: Can't find variable: QUnit [ { file: 'phantomjs://code/bridge.js', line: 14, function: '' } ]

PhantomJS timed out, possibly due to a missing QUnit start() call.

The same project that depends upon a previous version of jquery-csv, 0.8.8, does not experience this issue. In addition, a similar project using the same unit test scaffold but not jquery-csv runs without issue.

The jquery-csv package is installed via NPM in both scenarios. The output of all scenarios occurs regardless of unit tests actually verifying functionality that utilized jquery-csv, and it also occurs regardless of whether I place jquery-csv.js before or after require.js in my library file for the project.

wschmrdrNS avatar Feb 22 '18 14:02 wschmrdrNS

It's all documented in the release notes. All the tests were rewritten to use Tape.js. browser-side testing via PhantomJS was removed because it provides no additional value (ie none of the API surface is browser-specific. You should be able to run all the tests without any additional plugins using npm test.

evanplaice avatar Feb 22 '18 16:02 evanplaice