node-query/node_modules/jsdoc/plugins/test/specs/sourcetag.js

22 lines
866 B
JavaScript
Raw Normal View History

2014-10-22 10:11:40 -04:00
/*global describe: true, env: true, expect: true, it: true, jasmine: true */
2014-10-20 16:56:45 -04:00
describe("sourcetag plugin", function() {
2014-10-22 10:11:40 -04:00
var parser = jasmine.createParser();
var path = require('jsdoc/path');
2014-10-20 16:56:45 -04:00
2014-10-22 10:11:40 -04:00
var docSet;
var pluginPath = 'plugins/sourcetag';
var pluginPathResolved = path.join(env.dirname, pluginPath);
var plugin = require(pluginPathResolved);
require('jsdoc/plugins').installPlugins([pluginPathResolved], parser);
docSet = jasmine.getDocSetFromFile(pluginPath + '.js', parser);
2014-10-20 16:56:45 -04:00
it("should set the lineno and filename of the doclet's meta property", function() {
var doclet = docSet.getByLongname("module:plugins/sourcetag.handlers.newDoclet");
expect(doclet[0].meta).toBeDefined();
expect(doclet[0].meta.filename).toEqual("sourcetag.js");
expect(doclet[0].meta.lineno).toEqual(13);
});
});