diff --git a/__tests__/__snapshots__/test.js.snap b/__tests__/__snapshots__/test.js.snap index 4c60f818c..d3bf51bd7 100644 --- a/__tests__/__snapshots__/test.js.snap +++ b/__tests__/__snapshots__/test.js.snap @@ -743,6 +743,1331 @@ Returns **[Number](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refer " `; +exports[`html nested.input.js 1`] = ` +" + + + + documentation 5.0.1 | Documentation + + + + + + +
+
+
+
+

documentation

+
5.0.1
+ +
+ +
+ +
+
+
+ + +
+ + +
+ +

+ Klass +

+ + +
+ + +

Creates a new Klass

+ + +
new Klass(foo: any)
+ + +

+ Extends + + Stream.Writable + +

+ + + + + + + + + + +
Parameters
+
+ +
+
+ foo (any) + +
+ +
+ +
+ + + + + + + + + + + +
Static Members
+
+ +
+
+
+ + isClass(other, also) +
+
+
+
+ + + +

Decide whether an object is a Klass instance +This is a [klasssic]Klass +This is a [link to something that does not exist]DoesNot

+ + +
isClass(other: Object, also: any): boolean
+ + + + + + + + + + + +
Parameters
+
+ +
+
+ other (Object) + +
+ +
+ +
+
+ also (any) + +
+ +
+ +
+ + + + + + +
Returns
+ boolean: + whether the other thing is a Klass + + + + + + + + + + + + + + +
+ +
+
+ +
+
+
+ + isWeird(other) +
+
+
+
+ + + +

A function that triggers the case where the autolinker doesn't find +the referenced class type

+ + +
isWeird(other: Weird): boolean
+ + + + + + + + + + + +
Parameters
+
+ +
+
+ other (Weird) + +
+ +
+ +
+ + + + + + +
Returns
+ boolean: + whether the other thing is a Klass + + + + + + + + + + + + + + +
+ +
+
+ +
+
+
+ + isBuffer(buf, size) +
+
+
+
+ + + +

This method takes a Buffer object that will be linked to nodejs.org

+ + +
isBuffer(buf: (Buffer | string), size: number): boolean
+ + + + + + + + + + + +
Parameters
+
+ +
+
+ buf ((Buffer | string)) + +
+ +
+ +
+
+ size (number + = 0) + size + +
+ +
+ +
+ + + + + + +
Returns
+ boolean: + whether the other thing is a Klass + + + + + + + + + + + + + + +
+ +
+
+ +
+
+
+ + isArrayOfBuffers(buffers) +
+
+
+
+ + + +

This method takes an array of buffers and counts them

+ + +
isArrayOfBuffers(buffers: Array<Buffer>): number
+ + + + + + + + + + + +
Parameters
+
+ +
+
+ buffers (Array<Buffer>) + some buffers + +
+ +
+ +
+ + + + + + +
Returns
+ number: + how many + + + + + + + + +
Example
+ + +
var k = new Klass();
+k.isArrayOfBuffers();
+ + + + + + + + +
+ +
+
+ +
+
+
+ + MAGIC_NUMBER +
+
+
+
+ + + +

A magic number that identifies this Klass.

+ + +
MAGIC_NUMBER
+ + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+
+ +
+ + + + +
Instance Members
+
+ +
+
+
+ + getFoo() +
+
+
+
+ + + +

Get this Klass's foo

+ + +
getFoo(): Number
+ + + + + + + + + + + + + + + + +
Returns
+ Number: + foo + + + + + + + + +
Example
+ +

this shows you how to getFoo

+

+
var x = foo.getFoo();
+ + + + + + + + +
+ +
+
+ +
+
+
+ + withOptions(options, otherOptions) +
+
+
+
+ + + +

A function with an options parameter

+ + +
withOptions(options: Object, otherOptions: number?)
+ + + + + + + + + + + +
Parameters
+
+ +
+
+ options (Object) + +
+ + + + + + + + + + + + + + + + + + + + + + + + + +
NameDescription
options.foo string +
options.bar number +
+ +
+ +
+
+ otherOptions (number?) + +
+ +
+ +
+ + + + + + + + + + + + + + + +
+ +
+
+ +
+ + + + +
Events
+
+ +
+
+
+ + event +
+
+
+
+ + + +

Klass event

+ + +
event
+ + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+
+ +
+ + +
+ + + + +
+ + +
+ +

+ CustomError +

+ + +
+ + +

a typedef with nested properties

+ + +
CustomError(other: any, also: any)
+ + + + + + + + + + + +
Parameters
+
+ +
+
+ other (any) + +
+ +
+ +
+
+ also (any) + +
+ +
+ +
+ + + +
Properties
+
+ +
+ error (object) + : An error + + +
    + +
  • error.code string + +

    The error's code

    +
  • + +
  • error.description string + +

    The error's description

    +
  • + +
+ +
+ +
+ + + + + + + + + + + + + +
+ + + + +
+ + +
+ +

+ bar +

+ + +
+ + +

Get an instance of Klass. Will make +a klass instance multiword, +like a klass

+ + +
bar(): Klass
+ + + + + + + + + + + + + + + + +
Returns
+ Klass: + that class + + + + + + + + + + + + + + +
+ + + + +
+ + +
+ +

+ bar +

+ + +
+ + +

Rest property function

+ + +
bar(toys: ...Number): undefined
+ + + + + + + + + + + +
Parameters
+
+ +
+
+ toys (...Number) + +
+ +
+ +
+ + + + + + +
Returns
+ undefined: + nothing + + + + + + + + + + + + + + +
+ + + + +
+ + +
+ +

+ bar +

+ + +
+ + +

Get an instance of Klass. Will make +a klass instance multiword, +like a klass. This needs a number input.

+ + +
bar(): undefined
+ + + + + + + + + + + + + + + + +
Returns
+ undefined: + nothing + + + + + + + + + + + + + + +
+ + + + +
+ + +
+ +

+ Foo +

+ + +
+ + +

This is Foo

+ + +
new Foo()
+ + + + + + + + + + + + + + + + + + + + + + + +
Instance Members
+
+ +
+
+
+ + bar +
+
+
+
+ + + +

This is bar

+ + +
bar
+ + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+
+ +
+ + + + +
+ + + + +
+ + +
+ +

+ customStreams +

+ + +
+ + +

I am the container of stream types

+ + +
customStreams
+ + + + + + + + + + + + + + + + + + + + + +
Static Members
+
+ +
+
+
+ + new passthrough() +
+
+
+
+ + + +

I am a passthrough stream that belongs to customStreams

+ + +
new passthrough()
+ + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+
+ +
+ + + + + + +
+ + + +
+
+
+ + + + +" +`; + exports[`multi-file input 1`] = ` Array [ Object { diff --git a/__tests__/test.js b/__tests__/test.js index 2da48557e..cbcbbacca 100644 --- a/__tests__/test.js +++ b/__tests__/test.js @@ -71,7 +71,7 @@ test('bad input', function() { glob .sync(path.join(__dirname, 'fixture/bad', '*.input.js')) .forEach(function(file) { - test(path.basename(file), function(t) { + test(path.basename(file), function() { return documentation .build([file], readOptionsFromFile(file)) .then(res => { @@ -89,11 +89,11 @@ test('bad input', function() { }); }); -test('html', function() { +describe('html', function() { glob .sync(path.join(__dirname, 'fixture/html', '*.input.js')) .forEach(function(file) { - test(path.basename(file), async function(t) { + test(path.basename(file), async function() { const result = await documentation.build( [file], readOptionsFromFile(file) @@ -109,16 +109,16 @@ test('html', function() { }); }); -test('outputs', function() { +describe('outputs', function() { glob .sync(path.join(__dirname, 'fixture', '*.input.js')) .forEach(function(file) { - test(path.basename(file), async function(tt) { + test(path.basename(file), async function() { const result = await documentation.build( [file], readOptionsFromFile(file) ); - test('markdown', async function(t) { + test('markdown', async function() { const md = await outputMarkdown(_.cloneDeep(result), { markdownToc: true }); @@ -126,7 +126,7 @@ test('outputs', function() { }); if (file.match(/es6.input.js/)) { - test('no markdown TOC', async function(t) { + test('no markdown TOC', async function() { const txt = await outputMarkdown(_.cloneDeep(result), { markdownToc: false }); @@ -134,12 +134,12 @@ test('outputs', function() { }); } - test('markdown AST', async function(t) { + test('markdown AST', async function() { const ast = await outputMarkdownAST(_.cloneDeep(result), {}); expect(ast).toMatchSnapshot(); }); - test('JSON', function(t) { + test('JSON', function() { normalize(result); result.forEach(function(comment) { validate( @@ -157,9 +157,9 @@ test('outputs', function() { test('highlightAuto md output', async function() { var file = path.join( - __dirname, - 'fixture/auto_lang_hljs/multilanguage.input.js' - ), + __dirname, + 'fixture/auto_lang_hljs/multilanguage.input.js' + ), hljsConfig = { hljs: { highlightAuto: true, languages: ['js', 'css', 'html'] } };