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() {
|
describe("@listens tag", function() {
|
||||||
var doclet = require('jsdoc/doclet'),
|
var docSet = jasmine.getDocSetFromFile('test/fixtures/listenstag.js'),
|
||||||
doc = new doclet.Doclet('/** An event handler\n@function handler\n@listens Foo\n@listens Bar */', {});
|
doc = docSet.getByLongname('handler')[0];
|
||||||
|
|
||||||
it("should create a 'listens' property on the doclet, an array, with the events that are listened to", function() {
|
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();
|
expect(Array.isArray(doc.listens)).toBeTruthy();
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user