1 | 'use strict';
|
2 |
|
3 | describe('sourcetag plugin', function() {
|
4 | var env = require('jsdoc/env');
|
5 | var path = require('jsdoc/path');
|
6 |
|
7 | var docSet;
|
8 | var parser = jasmine.createParser();
|
9 | var pluginPath = 'plugins/sourcetag';
|
10 | var pluginPathResolved = path.join(env.dirname, pluginPath);
|
11 |
|
12 | require('jsdoc/plugins').installPlugins([pluginPathResolved], parser);
|
13 | docSet = jasmine.getDocSetFromFile(pluginPath + '.js', parser);
|
14 |
|
15 | it("should set the lineno and filename of the doclet's meta property", function() {
|
16 | var doclet = docSet.getByLongname('module:plugins/sourcetag.handlers.newDoclet');
|
17 |
|
18 | expect(doclet[0].meta).toBeDefined();
|
19 | expect(doclet[0].meta.filename).toEqual('sourcetag.js');
|
20 | expect(doclet[0].meta.lineno).toEqual(9);
|
21 | });
|
22 | });
|