mirror of
https://github.com/jsdoc/jsdoc.git
synced 2025-12-08 19:46:11 +00:00
commit
425e56f835
17
plugins/test/specs/verboseOutput.js
Normal file
17
plugins/test/specs/verboseOutput.js
Normal file
@ -0,0 +1,17 @@
|
||||
/**
|
||||
* @author Rob Taylor [manix84@gmail.com]
|
||||
*/
|
||||
|
||||
describe("verbose output plugin", function () {
|
||||
var parser = new (require("jsdoc/src/parser")).Parser(),
|
||||
plugin = require('plugins/verboseOutput'),
|
||||
docSet;
|
||||
|
||||
installPlugins(['plugins/verboseOutput'], parser);
|
||||
docSet = jasmine.getDocSetFromFile("plugins/verboseOutput.js", parser);
|
||||
|
||||
it("should log file names to console", function() {
|
||||
var fileBegin = docSet.getByLongname("module:plugins/verboseOutput.handlers.fileBegin");
|
||||
expect(fileBegin[0].description).toEqual("Logging the file name to the console.");
|
||||
});
|
||||
});
|
||||
15
plugins/verboseOutput.js
Normal file
15
plugins/verboseOutput.js
Normal file
@ -0,0 +1,15 @@
|
||||
/**
|
||||
* Adds a verbose output to the console, so that you can see what's happening in your process.
|
||||
* @module plugins/verboseOutput
|
||||
* @author Rob Taylor <manix84@gmail.com> - The basic idea
|
||||
* @author Michael Mathews <micmath@gmail.com> - Wrote the first itteration with me :)
|
||||
*/
|
||||
|
||||
exports.handlers = {
|
||||
/**
|
||||
* Logging the file name to the console.
|
||||
*/
|
||||
fileBegin: function (data) {
|
||||
console.log(data.filename);
|
||||
}
|
||||
};
|
||||
Loading…
x
Reference in New Issue
Block a user