![]() ![]() js that match Nose’s current test pattern, collect them all, then execute them using Rhino in a single Java subprocess at the end of all other tests. This command would look for any files along Nose’s path ending in. ![]() UsageĪssuming you’ve downloaded Rhino into ~/src, discover and run JavaScript tests with this command: $ nosetests -with-javascript -rhino-jar ~/src/rhino1_7R1/js.jar path/to/javascript/tests There is experimental support for python-spidermonkey using the -spidermonkey switch. Currently, NoseJS supports running executing tests in Rhino, a Java implementation of the JavaScript language. NoseJS will also find and run JavaScript test files, those that match Nose’s test pattern and end in. To disable lint checking, add -no-javascript-lint Running JavaScript Tests To check for lint without running any JavaScript unit tests, type: $ nosetests -with-javascript -no-javascript-tests path/to/javascript #Javascript lint command line for mac mac os#port install javascript-lint on Mac OS X) otherwise it is available for download on the jsl site. You can install jsl on most systems using your package manager (i.e. app.js) along the Nose path and run them through the jsl command line tool to check for “lint.” In other words, show you syntax errors, warnings, etc. Or you can clone the source using Mercurial from and install it with $ python setup.py develop Checking JavaScript Syntax You can get NoseJS with easy_install $ easy_install NoseJS There are some optional external dependencies in the sections below. Validate JavaScript syntax (check for lint). It currently has two features:ĭiscover and run JavaScript tests alongside Python tests NoseJS is designed for Python projects that require JavaScript code for some Web functionality. NoseJS is a Nose plugin for integrating JavaScript tests into a Python test suite. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |