Jeff Williams 8f1d892fbf ensure that filenames do not start with an underscore (#758)
Squashed commit of the following:

commit 11da3dbe026fb0c76d619f0295a195d1f012462e
Author: Jeff Williams <jeffrey.l.williams@gmail.com>
Date:   Fri Nov 7 14:42:02 2014 -0800

    add test for #758

commit f3e001d549c5e0e69e50b231f375da92f3e8f688
Merge: df1f4bd d551131
Author: Jeff Williams <jeffrey.l.williams@gmail.com>
Date:   Fri Nov 7 14:32:30 2014 -0800

    Merge remote-tracking branch 'danorton/patch-1' into 758

commit d5511316468eb93f852c51fab5eec380bcfee4b4
Author: Daniel Norton <daniel@danielnorton.com>
Date:   Wed Sep 3 17:00:49 2014 -0500

    Prevent filenames beginning with underscore

    A lot of related software (most notably github.io and the default configuration of jsdoc itself) ignores files with names that begin with an underscore, but the makeUniqueFilename() creates such filenames when the incoming filename is blank. This patch modifies makeUniqueFilename() to insert the ASCII letter "X" before empty filenames or filenames that begin with an underscore.
2014-11-07 14:42:16 -08:00
..
2014-03-03 07:43:01 -08:00
2014-03-04 13:47:57 -08:00

Testing JSDoc 3

Running Tests

Running tests is easy. Just change your working directory to the jsdoc folder and run the following command on Windows:

jsdoc -T

Or on OS X, Linux, and other POSIX-compliant platforms:

./jsdoc -T

If you can't get the short-form commands to work, try invoking Java directly:

java -cp lib/js.jar org.mozilla.javascript.tools.shell.Main \
-modules node_modules -modules rhino -modules lib -modules . \
jsdoc.js -T

Writing Tests

Adding tests is pretty easy, too. You can write tests for JSDoc itself (to make sure tags and the parser, etc. are working properly), tests for plugins, and/or tests for templates.

JSDoc 3 uses Jasmine (https://github.com/pivotal/jasmine) as its testing framework. Take a look at that project's wiki for documentation on writing tests in general.

Tests for JSDoc

Take a look at the files in the test directory for many examples of writing tests for JSDoc itself. The test\fixtures directory hold fixtures for use in the tests, and the test\specs directory holds the tests themselves.

Tests for plugins

Tests for plugins are found in the plugins\test directory. Plugins containing tests that were installed with the Jakefile install task will be run automatically.

Tests for templates

TODO