mirror of
https://github.com/zulip/zulip.git
synced 2025-11-04 14:03:30 +00:00
Move node tests to node_tests/.
This commit is contained in:
@@ -114,7 +114,7 @@ bottom of ``foobar.js``:
|
|||||||
This makes ``foobar.js`` follow the CommonJS module pattern, so it can
|
This makes ``foobar.js`` follow the CommonJS module pattern, so it can
|
||||||
be required in Node.js, which runs our tests.
|
be required in Node.js, which runs our tests.
|
||||||
|
|
||||||
Now create ``frontend_tests/node/foobar.js``. At the top, require
|
Now create ``frontend_tests/node_tests/foobar.js``. At the top, require
|
||||||
the `Node.js assert module <http://nodejs.org/api/assert.html>`__, and
|
the `Node.js assert module <http://nodejs.org/api/assert.html>`__, and
|
||||||
the module you're testing, like so:
|
the module you're testing, like so:
|
||||||
|
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ cd "$(dirname "$0")"/..
|
|||||||
|
|
||||||
export NODE_PATH=/usr/lib/nodejs:static
|
export NODE_PATH=/usr/lib/nodejs:static
|
||||||
|
|
||||||
INDEX_JS=frontend_tests/node/index.js
|
INDEX_JS=frontend_tests/node_tests/index.js
|
||||||
NODEJS=$(which nodejs || which node)
|
NODEJS=$(which nodejs || which node)
|
||||||
if [ "$1" = "cover" ]; then
|
if [ "$1" = "cover" ]; then
|
||||||
# Run a coverage test with Istanbul.
|
# Run a coverage test with Istanbul.
|
||||||
|
|||||||
Reference in New Issue
Block a user