When an interface is a) defined as an ES2015 class and b) assigned to a variable, JSDoc sometimes used the wrong `longname` and `memberof` for members of the interface (specifically, for instance properties). The root cause was that we weren't resolving `this` correctly within this type of interface. As a result, if you added a JSDoc comment to something like `this.foo = 'bar'`, the doclet for `this.foo` had the wrong `longname` and `memberof`. Fixing that issue uncovered another issue: When we merged the constructor's doclet with the interface's doclet, we preferred the constructor's doclet. However, the constructor's doclet used the wrong `kind` in this case; we already had code to fix up the `longname` and `memberof` of the combined doclet, but not the `kind`. The fix was to prefer the interface's doclet for all properties.
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
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