mirror of
https://github.com/jsdoc/jsdoc.git
synced 2025-12-08 19:46:11 +00:00
updated @listens test to use a fixture
This commit is contained in:
parent
db3451be72
commit
66d4b0623a
7
test/fixtures/listenstag.js
vendored
Normal file
7
test/fixtures/listenstag.js
vendored
Normal file
@ -0,0 +1,7 @@
|
||||
/** An event handler.
|
||||
* @function
|
||||
* @listens Foo
|
||||
* @listens Bar
|
||||
*/
|
||||
function handler () {
|
||||
}
|
||||
@ -1,6 +1,6 @@
|
||||
describe("@listens tag", function() {
|
||||
var doclet = require('jsdoc/doclet'),
|
||||
doc = new doclet.Doclet('/** An event handler\n@function handler\n@listens Foo\n@listens Bar */', {});
|
||||
var docSet = jasmine.getDocSetFromFile('test/fixtures/listenstag.js'),
|
||||
doc = docSet.getByLongname('handler')[0];
|
||||
|
||||
it("should create a 'listens' property on the doclet, an array, with the events that are listened to", function() {
|
||||
expect(Array.isArray(doc.listens)).toBeTruthy();
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user