-
-
-
-
-
- bar(toys)
-
- Rest property function
-
- Parameters
-
- ...Number
toys
- :
-
-
-
-
-
- Returns
- undefined
- :
-
-
-
-
- Klass(foo)
-
- Creates a new Klass
-
- Parameters
-
- Static members
-
-
-
-
-
-
- Instance members
-
-
-
-
-
-
-
-
diff --git a/test/fixture/infer-params.input.js b/test/fixture/infer-params.input.js
deleted file mode 100644
index d26f6a426..000000000
--- a/test/fixture/infer-params.input.js
+++ /dev/null
@@ -1,7 +0,0 @@
-/**
- * This function returns the number one.
- * @param {number} b the second param
- */
-function addThem(a, b, c, { d, e, f }) {
- return a + b + c + d + e + f;
-}
diff --git a/test/fixture/infer-params.output.custom.md b/test/fixture/infer-params.output.custom.md
deleted file mode 100644
index ed2211352..000000000
--- a/test/fixture/infer-params.output.custom.md
+++ /dev/null
@@ -1,13 +0,0 @@
-# addThem
-
-This function returns the number one.
-
-**Parameters**
-
-- `a`
-- `b` **number** the second param
-- `c`
-- `$3`
- - `$3.d`
- - `$3.e`
- - `$3.f`
diff --git a/test/fixture/infer-params.output.json b/test/fixture/infer-params.output.json
deleted file mode 100644
index d1a43ea13..000000000
--- a/test/fixture/infer-params.output.json
+++ /dev/null
@@ -1,93 +0,0 @@
-[
- {
- "description": "This function returns the number one.",
- "tags": [
- {
- "title": "param",
- "description": "the second param",
- "lineNumber": 2,
- "type": {
- "type": "NameExpression",
- "name": "number"
- },
- "name": "b"
- }
- ],
- "loc": {
- "start": {
- "line": 1,
- "column": 0
- },
- "end": {
- "line": 4,
- "column": 3
- }
- },
- "context": {
- "loc": {
- "start": {
- "line": 5,
- "column": 0
- },
- "end": {
- "line": 7,
- "column": 1
- }
- },
- "code": "/**\n * This function returns the number one.\n * @param {number} b the second param\n */\nfunction addThem(a, b, c, { d, e, f }) {\n return a + b + c + d + e + f;\n}\n"
- },
- "errors": [],
- "params": [
- {
- "title": "param",
- "name": "a",
- "lineNumber": 5
- },
- {
- "title": "param",
- "description": "the second param",
- "lineNumber": 2,
- "type": {
- "type": "NameExpression",
- "name": "number"
- },
- "name": "b"
- },
- {
- "title": "param",
- "name": "c",
- "lineNumber": 5
- },
- {
- "title": "param",
- "name": "$3",
- "properties": [
- {
- "title": "param",
- "name": "$3.d",
- "lineNumber": 5
- },
- {
- "title": "param",
- "name": "$3.e",
- "lineNumber": 5
- },
- {
- "title": "param",
- "name": "$3.f",
- "lineNumber": 5
- }
- ]
- }
- ],
- "name": "addThem",
- "kind": "function",
- "members": {
- "instance": [],
- "static": []
- },
- "path": [
- "addThem"
- ]
- }
-]
\ No newline at end of file
diff --git a/test/fixture/infer-params.output.md b/test/fixture/infer-params.output.md
deleted file mode 100644
index ed2211352..000000000
--- a/test/fixture/infer-params.output.md
+++ /dev/null
@@ -1,13 +0,0 @@
-# addThem
-
-This function returns the number one.
-
-**Parameters**
-
-- `a`
-- `b` **number** the second param
-- `c`
-- `$3`
- - `$3.d`
- - `$3.e`
- - `$3.f`
diff --git a/test/fixture/infer-params.output.md.json b/test/fixture/infer-params.output.md.json
deleted file mode 100644
index 09036b897..000000000
--- a/test/fixture/infer-params.output.md.json
+++ /dev/null
@@ -1,261 +0,0 @@
-{
- "type": "root",
- "children": [
- {
- "depth": 1,
- "type": "heading",
- "children": [
- {
- "type": "text",
- "value": "addThem"
- }
- ]
- },
- {
- "type": "paragraph",
- "children": [
- {
- "type": "text",
- "value": "This function returns the number one.",
- "position": {
- "start": {
- "line": 1,
- "column": 1
- },
- "end": {
- "line": 1,
- "column": 38
- },
- "indent": []
- }
- }
- ],
- "position": {
- "start": {
- "line": 1,
- "column": 1
- },
- "end": {
- "line": 1,
- "column": 38
- },
- "indent": []
- }
- },
- {
- "type": "strong",
- "children": [
- {
- "type": "text",
- "value": "Parameters"
- }
- ]
- },
- {
- "ordered": false,
- "type": "list",
- "children": [
- {
- "type": "listItem",
- "children": [
- {
- "type": "paragraph",
- "children": [
- {
- "type": "inlineCode",
- "value": "a"
- },
- {
- "type": "text",
- "value": " "
- },
- {
- "type": "text",
- "value": " "
- }
- ]
- }
- ]
- },
- {
- "type": "listItem",
- "children": [
- {
- "type": "paragraph",
- "children": [
- {
- "type": "inlineCode",
- "value": "b"
- },
- {
- "type": "text",
- "value": " "
- },
- {
- "type": "strong",
- "children": [
- {
- "type": "text",
- "value": "number"
- }
- ]
- },
- {
- "type": "text",
- "value": " "
- },
- {
- "type": "paragraph",
- "children": [
- {
- "type": "text",
- "value": "the second param",
- "position": {
- "start": {
- "line": 1,
- "column": 1
- },
- "end": {
- "line": 1,
- "column": 17
- },
- "indent": []
- }
- }
- ],
- "position": {
- "start": {
- "line": 1,
- "column": 1
- },
- "end": {
- "line": 1,
- "column": 17
- },
- "indent": []
- }
- }
- ]
- }
- ]
- },
- {
- "type": "listItem",
- "children": [
- {
- "type": "paragraph",
- "children": [
- {
- "type": "inlineCode",
- "value": "c"
- },
- {
- "type": "text",
- "value": " "
- },
- {
- "type": "text",
- "value": " "
- }
- ]
- }
- ]
- },
- {
- "type": "listItem",
- "children": [
- {
- "type": "paragraph",
- "children": [
- {
- "type": "inlineCode",
- "value": "$3"
- },
- {
- "type": "text",
- "value": " "
- },
- {
- "type": "text",
- "value": " "
- }
- ]
- },
- {
- "ordered": false,
- "type": "list",
- "children": [
- {
- "type": "listItem",
- "children": [
- {
- "type": "paragraph",
- "children": [
- {
- "type": "inlineCode",
- "value": "$3.d"
- },
- {
- "type": "text",
- "value": " "
- },
- {
- "type": "text",
- "value": " "
- }
- ]
- }
- ]
- },
- {
- "type": "listItem",
- "children": [
- {
- "type": "paragraph",
- "children": [
- {
- "type": "inlineCode",
- "value": "$3.e"
- },
- {
- "type": "text",
- "value": " "
- },
- {
- "type": "text",
- "value": " "
- }
- ]
- }
- ]
- },
- {
- "type": "listItem",
- "children": [
- {
- "type": "paragraph",
- "children": [
- {
- "type": "inlineCode",
- "value": "$3.f"
- },
- {
- "type": "text",
- "value": " "
- },
- {
- "type": "text",
- "value": " "
- }
- ]
- }
- ]
- }
- ]
- }
- ]
- }
- ]
- }
- ]
-}
\ No newline at end of file
diff --git a/test/fixture/inline-link.output.custom.md b/test/fixture/inline-link.output.custom.md
deleted file mode 100644
index 8ec430b4f..000000000
--- a/test/fixture/inline-link.output.custom.md
+++ /dev/null
@@ -1,20 +0,0 @@
-# addOne
-
-Adds one to a number
-
-**Parameters**
-
-- `a` **number** the input
-
-Returns **number** the output
-
-# inline-link.input
-
-This function returns the number one. Internally, this uses
-`addOne` to do the math.
-
-**Parameters**
-
-- `a` **number** the input
-
-Returns **number** numberone
diff --git a/test/fixture/inline-link.output.json b/test/fixture/inline-link.output.json
deleted file mode 100644
index f3f779449..000000000
--- a/test/fixture/inline-link.output.json
+++ /dev/null
@@ -1,162 +0,0 @@
-[
- {
- "description": "Adds one to a number",
- "tags": [
- {
- "title": "param",
- "description": "the input",
- "lineNumber": 2,
- "type": {
- "type": "NameExpression",
- "name": "number"
- },
- "name": "a"
- },
- {
- "title": "returns",
- "description": "the output",
- "lineNumber": 3,
- "type": {
- "type": "NameExpression",
- "name": "number"
- }
- }
- ],
- "loc": {
- "start": {
- "line": 1,
- "column": 0
- },
- "end": {
- "line": 5,
- "column": 3
- }
- },
- "context": {
- "loc": {
- "start": {
- "line": 6,
- "column": 0
- },
- "end": {
- "line": 8,
- "column": 1
- }
- },
- "code": "/**\n * Adds one to a number\n * @param {number} a the input\n * @returns {number} the output\n */\nfunction addOne(a) {\n return a + 1;\n}\n\n/**\n * This function returns the number one. Internally, this uses\n * {@link addOne} to do the math.\n * @param {number} a the input\n * @returns {number} numberone\n */\nmodule.exports = function (a) {\n return addOne(a);\n};\n"
- },
- "errors": [],
- "params": [
- {
- "title": "param",
- "description": "the input",
- "lineNumber": 2,
- "type": {
- "type": "NameExpression",
- "name": "number"
- },
- "name": "a"
- }
- ],
- "returns": [
- {
- "title": "returns",
- "description": "the output",
- "lineNumber": 3,
- "type": {
- "type": "NameExpression",
- "name": "number"
- }
- }
- ],
- "name": "addOne",
- "kind": "function",
- "members": {
- "instance": [],
- "static": []
- },
- "path": [
- "addOne"
- ]
- },
- {
- "description": "This function returns the number one. Internally, this uses\n{@link addOne} to do the math.",
- "tags": [
- {
- "title": "param",
- "description": "the input",
- "lineNumber": 3,
- "type": {
- "type": "NameExpression",
- "name": "number"
- },
- "name": "a"
- },
- {
- "title": "returns",
- "description": "numberone",
- "lineNumber": 4,
- "type": {
- "type": "NameExpression",
- "name": "number"
- }
- }
- ],
- "loc": {
- "start": {
- "line": 10,
- "column": 0
- },
- "end": {
- "line": 15,
- "column": 3
- }
- },
- "context": {
- "loc": {
- "start": {
- "line": 16,
- "column": 0
- },
- "end": {
- "line": 18,
- "column": 2
- }
- },
- "code": "/**\n * Adds one to a number\n * @param {number} a the input\n * @returns {number} the output\n */\nfunction addOne(a) {\n return a + 1;\n}\n\n/**\n * This function returns the number one. Internally, this uses\n * {@link addOne} to do the math.\n * @param {number} a the input\n * @returns {number} numberone\n */\nmodule.exports = function (a) {\n return addOne(a);\n};\n"
- },
- "errors": [],
- "params": [
- {
- "title": "param",
- "description": "the input",
- "lineNumber": 3,
- "type": {
- "type": "NameExpression",
- "name": "number"
- },
- "name": "a"
- }
- ],
- "returns": [
- {
- "title": "returns",
- "description": "numberone",
- "lineNumber": 4,
- "type": {
- "type": "NameExpression",
- "name": "number"
- }
- }
- ],
- "name": "inline-link.input",
- "kind": "function",
- "members": {
- "instance": [],
- "static": []
- },
- "path": [
- "inline-link.input"
- ]
- }
-]
\ No newline at end of file
diff --git a/test/fixture/inline-link.output.md b/test/fixture/inline-link.output.md
deleted file mode 100644
index 8ec430b4f..000000000
--- a/test/fixture/inline-link.output.md
+++ /dev/null
@@ -1,20 +0,0 @@
-# addOne
-
-Adds one to a number
-
-**Parameters**
-
-- `a` **number** the input
-
-Returns **number** the output
-
-# inline-link.input
-
-This function returns the number one. Internally, this uses
-`addOne` to do the math.
-
-**Parameters**
-
-- `a` **number** the input
-
-Returns **number** numberone
diff --git a/test/fixture/inline-link.output.md.json b/test/fixture/inline-link.output.md.json
deleted file mode 100644
index 0bb0282a5..000000000
--- a/test/fixture/inline-link.output.md.json
+++ /dev/null
@@ -1,381 +0,0 @@
-{
- "type": "root",
- "children": [
- {
- "depth": 1,
- "type": "heading",
- "children": [
- {
- "type": "text",
- "value": "addOne"
- }
- ]
- },
- {
- "type": "paragraph",
- "children": [
- {
- "type": "text",
- "value": "Adds one to a number",
- "position": {
- "start": {
- "line": 1,
- "column": 1
- },
- "end": {
- "line": 1,
- "column": 21
- },
- "indent": []
- }
- }
- ],
- "position": {
- "start": {
- "line": 1,
- "column": 1
- },
- "end": {
- "line": 1,
- "column": 21
- },
- "indent": []
- }
- },
- {
- "type": "strong",
- "children": [
- {
- "type": "text",
- "value": "Parameters"
- }
- ]
- },
- {
- "ordered": false,
- "type": "list",
- "children": [
- {
- "type": "listItem",
- "children": [
- {
- "type": "paragraph",
- "children": [
- {
- "type": "inlineCode",
- "value": "a"
- },
- {
- "type": "text",
- "value": " "
- },
- {
- "type": "strong",
- "children": [
- {
- "type": "text",
- "value": "number"
- }
- ]
- },
- {
- "type": "text",
- "value": " "
- },
- {
- "type": "paragraph",
- "children": [
- {
- "type": "text",
- "value": "the input",
- "position": {
- "start": {
- "line": 1,
- "column": 1
- },
- "end": {
- "line": 1,
- "column": 10
- },
- "indent": []
- }
- }
- ],
- "position": {
- "start": {
- "line": 1,
- "column": 1
- },
- "end": {
- "line": 1,
- "column": 10
- },
- "indent": []
- }
- }
- ]
- }
- ]
- }
- ]
- },
- {
- "type": "paragraph",
- "children": [
- {
- "type": "text",
- "value": "Returns "
- },
- {
- "type": "strong",
- "children": [
- {
- "type": "text",
- "value": "number"
- }
- ]
- },
- {
- "type": "text",
- "value": " "
- },
- {
- "type": "paragraph",
- "children": [
- {
- "type": "text",
- "value": "the output",
- "position": {
- "start": {
- "line": 1,
- "column": 1
- },
- "end": {
- "line": 1,
- "column": 11
- },
- "indent": []
- }
- }
- ],
- "position": {
- "start": {
- "line": 1,
- "column": 1
- },
- "end": {
- "line": 1,
- "column": 11
- },
- "indent": []
- }
- }
- ]
- },
- {
- "depth": 1,
- "type": "heading",
- "children": [
- {
- "type": "text",
- "value": "inline-link.input"
- }
- ]
- },
- {
- "type": "paragraph",
- "children": [
- {
- "type": "text",
- "value": "This function returns the number one. Internally, this uses\n",
- "position": {
- "start": {
- "line": 1,
- "column": 1
- },
- "end": {
- "line": 2,
- "column": 1
- },
- "indent": [
- 1
- ]
- }
- },
- {
- "type": "inlineCode",
- "value": "addOne",
- "position": {
- "start": {
- "line": 2,
- "column": 1
- },
- "end": {
- "line": 2,
- "column": 9
- },
- "indent": []
- }
- },
- {
- "type": "text",
- "value": " to do the math.",
- "position": {
- "start": {
- "line": 2,
- "column": 9
- },
- "end": {
- "line": 2,
- "column": 25
- },
- "indent": []
- }
- }
- ],
- "position": {
- "start": {
- "line": 1,
- "column": 1
- },
- "end": {
- "line": 2,
- "column": 25
- },
- "indent": [
- 1
- ]
- }
- },
- {
- "type": "strong",
- "children": [
- {
- "type": "text",
- "value": "Parameters"
- }
- ]
- },
- {
- "ordered": false,
- "type": "list",
- "children": [
- {
- "type": "listItem",
- "children": [
- {
- "type": "paragraph",
- "children": [
- {
- "type": "inlineCode",
- "value": "a"
- },
- {
- "type": "text",
- "value": " "
- },
- {
- "type": "strong",
- "children": [
- {
- "type": "text",
- "value": "number"
- }
- ]
- },
- {
- "type": "text",
- "value": " "
- },
- {
- "type": "paragraph",
- "children": [
- {
- "type": "text",
- "value": "the input",
- "position": {
- "start": {
- "line": 1,
- "column": 1
- },
- "end": {
- "line": 1,
- "column": 10
- },
- "indent": []
- }
- }
- ],
- "position": {
- "start": {
- "line": 1,
- "column": 1
- },
- "end": {
- "line": 1,
- "column": 10
- },
- "indent": []
- }
- }
- ]
- }
- ]
- }
- ]
- },
- {
- "type": "paragraph",
- "children": [
- {
- "type": "text",
- "value": "Returns "
- },
- {
- "type": "strong",
- "children": [
- {
- "type": "text",
- "value": "number"
- }
- ]
- },
- {
- "type": "text",
- "value": " "
- },
- {
- "type": "paragraph",
- "children": [
- {
- "type": "text",
- "value": "numberone",
- "position": {
- "start": {
- "line": 1,
- "column": 1
- },
- "end": {
- "line": 1,
- "column": 10
- },
- "indent": []
- }
- }
- ],
- "position": {
- "start": {
- "line": 1,
- "column": 1
- },
- "end": {
- "line": 1,
- "column": 10
- },
- "indent": []
- }
- }
- ]
- }
- ]
-}
\ No newline at end of file
diff --git a/test/fixture/internal.output.custom.md b/test/fixture/internal.output.custom.md
deleted file mode 100644
index 069747607..000000000
--- a/test/fixture/internal.output.custom.md
+++ /dev/null
@@ -1,3 +0,0 @@
-# foo
-
-I am in `external.input.js`.
diff --git a/test/fixture/internal.output.json b/test/fixture/internal.output.json
deleted file mode 100644
index 786b13c63..000000000
--- a/test/fixture/internal.output.json
+++ /dev/null
@@ -1,39 +0,0 @@
-[
- {
- "description": "I am in `external.input.js`.",
- "tags": [],
- "loc": {
- "start": {
- "line": 5,
- "column": 0
- },
- "end": {
- "line": 7,
- "column": 3
- }
- },
- "context": {
- "loc": {
- "start": {
- "line": 8,
- "column": 0
- },
- "end": {
- "line": 11,
- "column": 1
- }
- },
- "code": "require('external');\nrequire('external2');\nrequire('module-not-found');\n\n/**\n * I am in `external.input.js`.\n */\nfunction foo() {\n 'use strict';\n return 'bar';\n}\n\nmodule.exports = foo;\n"
- },
- "errors": [],
- "name": "foo",
- "kind": "function",
- "members": {
- "instance": [],
- "static": []
- },
- "path": [
- "foo"
- ]
- }
-]
\ No newline at end of file
diff --git a/test/fixture/internal.output.md b/test/fixture/internal.output.md
deleted file mode 100644
index 069747607..000000000
--- a/test/fixture/internal.output.md
+++ /dev/null
@@ -1,3 +0,0 @@
-# foo
-
-I am in `external.input.js`.
diff --git a/test/fixture/internal.output.md.json b/test/fixture/internal.output.md.json
deleted file mode 100644
index b0488877d..000000000
--- a/test/fixture/internal.output.md.json
+++ /dev/null
@@ -1,76 +0,0 @@
-{
- "type": "root",
- "children": [
- {
- "depth": 1,
- "type": "heading",
- "children": [
- {
- "type": "text",
- "value": "foo"
- }
- ]
- },
- {
- "type": "paragraph",
- "children": [
- {
- "type": "text",
- "value": "I am in ",
- "position": {
- "start": {
- "line": 1,
- "column": 1
- },
- "end": {
- "line": 1,
- "column": 9
- },
- "indent": []
- }
- },
- {
- "type": "inlineCode",
- "value": "external.input.js",
- "position": {
- "start": {
- "line": 1,
- "column": 9
- },
- "end": {
- "line": 1,
- "column": 28
- },
- "indent": []
- }
- },
- {
- "type": "text",
- "value": ".",
- "position": {
- "start": {
- "line": 1,
- "column": 28
- },
- "end": {
- "line": 1,
- "column": 29
- },
- "indent": []
- }
- }
- ],
- "position": {
- "start": {
- "line": 1,
- "column": 1
- },
- "end": {
- "line": 1,
- "column": 29
- },
- "indent": []
- }
- }
- ]
-}
\ No newline at end of file
diff --git a/test/fixture/lint/lint.input.js b/test/fixture/lint/lint.input.js
deleted file mode 100644
index dd4d8a3ed..000000000
--- a/test/fixture/lint/lint.input.js
+++ /dev/null
@@ -1,12 +0,0 @@
-/**
- * @param {String} foo bar
- * @param {Array
} foo bar
- * @param {Array} foo bar
- * @param {Array|Number} foo bar
- * @memberof notfound
- */
-
-/**
- * @param {String} baz bar
- * @private
- */
diff --git a/test/fixture/lint/lint.output.js b/test/fixture/lint/lint.output.js
deleted file mode 100644
index ec554719c..000000000
--- a/test/fixture/lint/lint.output.js
+++ /dev/null
@@ -1,9 +0,0 @@
- 1:1 warning could not determine @name for hierarchy
- 2:1 warning type String found, string is standard
- 3:1 warning type Number found, number is standard
- 4:1 warning type Number found, number is standard
- 5:1 warning type Number found, number is standard
- 6:1 warning @memberof reference to notfound not found
- 10:1 warning type String found, string is standard
-
-⚠ 8 warnings
diff --git a/test/fixture/merge-infered-type.output.custom.md b/test/fixture/merge-infered-type.output.custom.md
deleted file mode 100644
index e033cf7c6..000000000
--- a/test/fixture/merge-infered-type.output.custom.md
+++ /dev/null
@@ -1,9 +0,0 @@
-# addFive
-
-Add five to `x`.
-
-**Parameters**
-
-- `x` **number** The number to add five to.
-
-Returns **number** x plus five.
diff --git a/test/fixture/merge-infered-type.output.json b/test/fixture/merge-infered-type.output.json
deleted file mode 100644
index 26a353c14..000000000
--- a/test/fixture/merge-infered-type.output.json
+++ /dev/null
@@ -1,82 +0,0 @@
-[
- {
- "description": "Add five to `x`.",
- "tags": [
- {
- "title": "param",
- "description": "The number to add five to.",
- "lineNumber": 3,
- "type": {
- "type": "NameExpression",
- "name": "number"
- },
- "name": "x"
- },
- {
- "title": "returns",
- "description": "x plus five.",
- "lineNumber": 4,
- "type": {
- "type": "NameExpression",
- "name": "number"
- }
- }
- ],
- "loc": {
- "start": {
- "line": 1,
- "column": 0
- },
- "end": {
- "line": 6,
- "column": 3
- }
- },
- "context": {
- "loc": {
- "start": {
- "line": 7,
- "column": 0
- },
- "end": {
- "line": 9,
- "column": 1
- }
- },
- "code": "/**\n * Add five to `x`.\n *\n * @param x The number to add five to.\n * @returns {number} x plus five.\n */\nfunction addFive(x: number): number {\n return x + 5;\n}\n"
- },
- "errors": [],
- "params": [
- {
- "title": "param",
- "description": "The number to add five to.",
- "lineNumber": 3,
- "type": {
- "type": "NameExpression",
- "name": "number"
- },
- "name": "x"
- }
- ],
- "returns": [
- {
- "title": "returns",
- "description": "x plus five.",
- "lineNumber": 4,
- "type": {
- "type": "NameExpression",
- "name": "number"
- }
- }
- ],
- "name": "addFive",
- "kind": "function",
- "members": {
- "instance": [],
- "static": []
- },
- "path": [
- "addFive"
- ]
- }
-]
\ No newline at end of file
diff --git a/test/fixture/merge-infered-type.output.md b/test/fixture/merge-infered-type.output.md
deleted file mode 100644
index e033cf7c6..000000000
--- a/test/fixture/merge-infered-type.output.md
+++ /dev/null
@@ -1,9 +0,0 @@
-# addFive
-
-Add five to `x`.
-
-**Parameters**
-
-- `x` **number** The number to add five to.
-
-Returns **number** x plus five.
diff --git a/test/fixture/merge-infered-type.output.md.json b/test/fixture/merge-infered-type.output.md.json
deleted file mode 100644
index 3dde4a8b3..000000000
--- a/test/fixture/merge-infered-type.output.md.json
+++ /dev/null
@@ -1,206 +0,0 @@
-{
- "type": "root",
- "children": [
- {
- "depth": 1,
- "type": "heading",
- "children": [
- {
- "type": "text",
- "value": "addFive"
- }
- ]
- },
- {
- "type": "paragraph",
- "children": [
- {
- "type": "text",
- "value": "Add five to ",
- "position": {
- "start": {
- "line": 1,
- "column": 1
- },
- "end": {
- "line": 1,
- "column": 13
- },
- "indent": []
- }
- },
- {
- "type": "inlineCode",
- "value": "x",
- "position": {
- "start": {
- "line": 1,
- "column": 13
- },
- "end": {
- "line": 1,
- "column": 16
- },
- "indent": []
- }
- },
- {
- "type": "text",
- "value": ".",
- "position": {
- "start": {
- "line": 1,
- "column": 16
- },
- "end": {
- "line": 1,
- "column": 17
- },
- "indent": []
- }
- }
- ],
- "position": {
- "start": {
- "line": 1,
- "column": 1
- },
- "end": {
- "line": 1,
- "column": 17
- },
- "indent": []
- }
- },
- {
- "type": "strong",
- "children": [
- {
- "type": "text",
- "value": "Parameters"
- }
- ]
- },
- {
- "ordered": false,
- "type": "list",
- "children": [
- {
- "type": "listItem",
- "children": [
- {
- "type": "paragraph",
- "children": [
- {
- "type": "inlineCode",
- "value": "x"
- },
- {
- "type": "text",
- "value": " "
- },
- {
- "type": "strong",
- "children": [
- {
- "type": "text",
- "value": "number"
- }
- ]
- },
- {
- "type": "text",
- "value": " "
- },
- {
- "type": "paragraph",
- "children": [
- {
- "type": "text",
- "value": "The number to add five to.",
- "position": {
- "start": {
- "line": 1,
- "column": 1
- },
- "end": {
- "line": 1,
- "column": 27
- },
- "indent": []
- }
- }
- ],
- "position": {
- "start": {
- "line": 1,
- "column": 1
- },
- "end": {
- "line": 1,
- "column": 27
- },
- "indent": []
- }
- }
- ]
- }
- ]
- }
- ]
- },
- {
- "type": "paragraph",
- "children": [
- {
- "type": "text",
- "value": "Returns "
- },
- {
- "type": "strong",
- "children": [
- {
- "type": "text",
- "value": "number"
- }
- ]
- },
- {
- "type": "text",
- "value": " "
- },
- {
- "type": "paragraph",
- "children": [
- {
- "type": "text",
- "value": "x plus five.",
- "position": {
- "start": {
- "line": 1,
- "column": 1
- },
- "end": {
- "line": 1,
- "column": 13
- },
- "indent": []
- }
- }
- ],
- "position": {
- "start": {
- "line": 1,
- "column": 1
- },
- "end": {
- "line": 1,
- "column": 13
- },
- "indent": []
- }
- }
- ]
- }
- ]
-}
\ No newline at end of file
diff --git a/test/fixture/multiexample.input.js b/test/fixture/multiexample.input.js
deleted file mode 100644
index 88227f4df..000000000
--- a/test/fixture/multiexample.input.js
+++ /dev/null
@@ -1,16 +0,0 @@
-/**
- * This function returns the number one.
- * @returns {Number} numberone
- * @example
- * foo(1);
- * @example
- * foo(2);
- * @throws {Error} if you give it something
- * @throws {TypeError} if you give it something else
- * @augments Foo
- * @augments Bar
- */
-module.exports = function () {
- // this returns 1
- return 1;
-};
diff --git a/test/fixture/multiexample.output.custom.md b/test/fixture/multiexample.output.custom.md
deleted file mode 100644
index fe1995655..000000000
--- a/test/fixture/multiexample.output.custom.md
+++ /dev/null
@@ -1,15 +0,0 @@
-# multiexample.input
-
-This function returns the number one.
-
-**Examples**
-
-```javascript
-foo(1);
-```
-
-```javascript
-foo(2);
-```
-
-Returns **Number** numberone
diff --git a/test/fixture/multiexample.output.json b/test/fixture/multiexample.output.json
deleted file mode 100644
index 97f64bba2..000000000
--- a/test/fixture/multiexample.output.json
+++ /dev/null
@@ -1,142 +0,0 @@
-[
- {
- "description": "This function returns the number one.",
- "tags": [
- {
- "title": "returns",
- "description": "numberone",
- "lineNumber": 2,
- "type": {
- "type": "NameExpression",
- "name": "Number"
- }
- },
- {
- "title": "example",
- "description": "foo(1);",
- "lineNumber": 3
- },
- {
- "title": "example",
- "description": "foo(2);",
- "lineNumber": 5
- },
- {
- "title": "throws",
- "description": "if you give it something",
- "lineNumber": 7,
- "type": {
- "type": "NameExpression",
- "name": "Error"
- }
- },
- {
- "title": "throws",
- "description": "if you give it something else",
- "lineNumber": 8,
- "type": {
- "type": "NameExpression",
- "name": "TypeError"
- }
- },
- {
- "title": "augments",
- "description": null,
- "lineNumber": 9,
- "type": null,
- "name": "Foo"
- },
- {
- "title": "augments",
- "description": null,
- "lineNumber": 10,
- "type": null,
- "name": "Bar"
- }
- ],
- "loc": {
- "start": {
- "line": 1,
- "column": 0
- },
- "end": {
- "line": 12,
- "column": 3
- }
- },
- "context": {
- "loc": {
- "start": {
- "line": 13,
- "column": 0
- },
- "end": {
- "line": 16,
- "column": 2
- }
- },
- "code": "/**\n * This function returns the number one.\n * @returns {Number} numberone\n * @example\n * foo(1);\n * @example\n * foo(2);\n * @throws {Error} if you give it something\n * @throws {TypeError} if you give it something else\n * @augments Foo\n * @augments Bar\n */\nmodule.exports = function () {\n // this returns 1\n return 1;\n};\n"
- },
- "errors": [],
- "returns": [
- {
- "title": "returns",
- "description": "numberone",
- "lineNumber": 2,
- "type": {
- "type": "NameExpression",
- "name": "Number"
- }
- }
- ],
- "examples": [
- "foo(1);",
- "foo(2);"
- ],
- "throws": [
- {
- "title": "throws",
- "description": "if you give it something",
- "lineNumber": 7,
- "type": {
- "type": "NameExpression",
- "name": "Error"
- }
- },
- {
- "title": "throws",
- "description": "if you give it something else",
- "lineNumber": 8,
- "type": {
- "type": "NameExpression",
- "name": "TypeError"
- }
- }
- ],
- "augments": [
- {
- "title": "augments",
- "description": null,
- "lineNumber": 9,
- "type": null,
- "name": "Foo"
- },
- {
- "title": "augments",
- "description": null,
- "lineNumber": 10,
- "type": null,
- "name": "Bar"
- }
- ],
- "name": "multiexample.input",
- "kind": "function",
- "members": {
- "instance": [],
- "static": []
- },
- "path": [
- "multiexample.input"
- ]
- }
-]
\ No newline at end of file
diff --git a/test/fixture/multiexample.output.md b/test/fixture/multiexample.output.md
deleted file mode 100644
index fe1995655..000000000
--- a/test/fixture/multiexample.output.md
+++ /dev/null
@@ -1,15 +0,0 @@
-# multiexample.input
-
-This function returns the number one.
-
-**Examples**
-
-```javascript
-foo(1);
-```
-
-```javascript
-foo(2);
-```
-
-Returns **Number** numberone
diff --git a/test/fixture/multiexample.output.md.json b/test/fixture/multiexample.output.md.json
deleted file mode 100644
index aa0d89c72..000000000
--- a/test/fixture/multiexample.output.md.json
+++ /dev/null
@@ -1,118 +0,0 @@
-{
- "type": "root",
- "children": [
- {
- "depth": 1,
- "type": "heading",
- "children": [
- {
- "type": "text",
- "value": "multiexample.input"
- }
- ]
- },
- {
- "type": "paragraph",
- "children": [
- {
- "type": "text",
- "value": "This function returns the number one.",
- "position": {
- "start": {
- "line": 1,
- "column": 1
- },
- "end": {
- "line": 1,
- "column": 38
- },
- "indent": []
- }
- }
- ],
- "position": {
- "start": {
- "line": 1,
- "column": 1
- },
- "end": {
- "line": 1,
- "column": 38
- },
- "indent": []
- }
- },
- {
- "type": "strong",
- "children": [
- {
- "type": "text",
- "value": "Examples"
- }
- ]
- },
- {
- "lang": "javascript",
- "type": "code",
- "value": "foo(1);"
- },
- {
- "lang": "javascript",
- "type": "code",
- "value": "foo(2);"
- },
- {
- "type": "paragraph",
- "children": [
- {
- "type": "text",
- "value": "Returns "
- },
- {
- "type": "strong",
- "children": [
- {
- "type": "text",
- "value": "Number"
- }
- ]
- },
- {
- "type": "text",
- "value": " "
- },
- {
- "type": "paragraph",
- "children": [
- {
- "type": "text",
- "value": "numberone",
- "position": {
- "start": {
- "line": 1,
- "column": 1
- },
- "end": {
- "line": 1,
- "column": 10
- },
- "indent": []
- }
- }
- ],
- "position": {
- "start": {
- "line": 1,
- "column": 1
- },
- "end": {
- "line": 1,
- "column": 10
- },
- "indent": []
- }
- }
- ]
- }
- ]
-}
\ No newline at end of file
diff --git a/test/fixture/multisignature.output.custom.md b/test/fixture/multisignature.output.custom.md
deleted file mode 100644
index c3739a247..000000000
--- a/test/fixture/multisignature.output.custom.md
+++ /dev/null
@@ -1,19 +0,0 @@
-# getTheTime
-
-Get the time
-
-**Parameters**
-
-- `time`
-
-Returns **Date** the current date
-
-# getTheTime
-
-Set the time
-
-**Parameters**
-
-- `time` **Date** the current time
-
-Returns **undefined** nothing
diff --git a/test/fixture/multisignature.output.json b/test/fixture/multisignature.output.json
deleted file mode 100644
index 6a491a495..000000000
--- a/test/fixture/multisignature.output.json
+++ /dev/null
@@ -1,145 +0,0 @@
-[
- {
- "description": "Get the time",
- "tags": [
- {
- "title": "returns",
- "description": "the current date",
- "lineNumber": 2,
- "type": {
- "type": "NameExpression",
- "name": "Date"
- }
- }
- ],
- "loc": {
- "start": {
- "line": 3,
- "column": 0
- },
- "end": {
- "line": 6,
- "column": 3
- }
- },
- "context": {
- "loc": {
- "start": {
- "line": 13,
- "column": 0
- },
- "end": {
- "line": 19,
- "column": 1
- }
- },
- "code": "var theTime;\n\n/**\n * Get the time\n * @returns {Date} the current date\n */\n\n/**\n * Set the time\n * @param {Date} time the current time\n * @returns {undefined} nothing\n */\nfunction getTheTime(time) {\n if (arguments.length === 0) {\n return new Date();\n } else {\n theTime = time;\n }\n}\n"
- },
- "errors": [],
- "returns": [
- {
- "title": "returns",
- "description": "the current date",
- "lineNumber": 2,
- "type": {
- "type": "NameExpression",
- "name": "Date"
- }
- }
- ],
- "name": "getTheTime",
- "kind": "function",
- "params": [
- {
- "title": "param",
- "name": "time",
- "lineNumber": 13
- }
- ],
- "members": {
- "instance": [],
- "static": []
- },
- "path": [
- "getTheTime"
- ]
- },
- {
- "description": "Set the time",
- "tags": [
- {
- "title": "param",
- "description": "the current time",
- "lineNumber": 2,
- "type": {
- "type": "NameExpression",
- "name": "Date"
- },
- "name": "time"
- },
- {
- "title": "returns",
- "description": "nothing",
- "lineNumber": 3,
- "type": {
- "type": "UndefinedLiteral"
- }
- }
- ],
- "loc": {
- "start": {
- "line": 8,
- "column": 0
- },
- "end": {
- "line": 12,
- "column": 3
- }
- },
- "context": {
- "loc": {
- "start": {
- "line": 13,
- "column": 0
- },
- "end": {
- "line": 19,
- "column": 1
- }
- },
- "code": "var theTime;\n\n/**\n * Get the time\n * @returns {Date} the current date\n */\n\n/**\n * Set the time\n * @param {Date} time the current time\n * @returns {undefined} nothing\n */\nfunction getTheTime(time) {\n if (arguments.length === 0) {\n return new Date();\n } else {\n theTime = time;\n }\n}\n"
- },
- "errors": [],
- "params": [
- {
- "title": "param",
- "description": "the current time",
- "lineNumber": 2,
- "type": {
- "type": "NameExpression",
- "name": "Date"
- },
- "name": "time"
- }
- ],
- "returns": [
- {
- "title": "returns",
- "description": "nothing",
- "lineNumber": 3,
- "type": {
- "type": "UndefinedLiteral"
- }
- }
- ],
- "name": "getTheTime",
- "kind": "function",
- "members": {
- "instance": [],
- "static": []
- },
- "path": [
- "getTheTime"
- ]
- }
-]
\ No newline at end of file
diff --git a/test/fixture/multisignature.output.md b/test/fixture/multisignature.output.md
deleted file mode 100644
index c3739a247..000000000
--- a/test/fixture/multisignature.output.md
+++ /dev/null
@@ -1,19 +0,0 @@
-# getTheTime
-
-Get the time
-
-**Parameters**
-
-- `time`
-
-Returns **Date** the current date
-
-# getTheTime
-
-Set the time
-
-**Parameters**
-
-- `time` **Date** the current time
-
-Returns **undefined** nothing
diff --git a/test/fixture/multisignature.output.md.json b/test/fixture/multisignature.output.md.json
deleted file mode 100644
index 80938861f..000000000
--- a/test/fixture/multisignature.output.md.json
+++ /dev/null
@@ -1,307 +0,0 @@
-{
- "type": "root",
- "children": [
- {
- "depth": 1,
- "type": "heading",
- "children": [
- {
- "type": "text",
- "value": "getTheTime"
- }
- ]
- },
- {
- "type": "paragraph",
- "children": [
- {
- "type": "text",
- "value": "Get the time",
- "position": {
- "start": {
- "line": 1,
- "column": 1
- },
- "end": {
- "line": 1,
- "column": 13
- },
- "indent": []
- }
- }
- ],
- "position": {
- "start": {
- "line": 1,
- "column": 1
- },
- "end": {
- "line": 1,
- "column": 13
- },
- "indent": []
- }
- },
- {
- "type": "strong",
- "children": [
- {
- "type": "text",
- "value": "Parameters"
- }
- ]
- },
- {
- "ordered": false,
- "type": "list",
- "children": [
- {
- "type": "listItem",
- "children": [
- {
- "type": "paragraph",
- "children": [
- {
- "type": "inlineCode",
- "value": "time"
- },
- {
- "type": "text",
- "value": " "
- },
- {
- "type": "text",
- "value": " "
- }
- ]
- }
- ]
- }
- ]
- },
- {
- "type": "paragraph",
- "children": [
- {
- "type": "text",
- "value": "Returns "
- },
- {
- "type": "strong",
- "children": [
- {
- "type": "text",
- "value": "Date"
- }
- ]
- },
- {
- "type": "text",
- "value": " "
- },
- {
- "type": "paragraph",
- "children": [
- {
- "type": "text",
- "value": "the current date",
- "position": {
- "start": {
- "line": 1,
- "column": 1
- },
- "end": {
- "line": 1,
- "column": 17
- },
- "indent": []
- }
- }
- ],
- "position": {
- "start": {
- "line": 1,
- "column": 1
- },
- "end": {
- "line": 1,
- "column": 17
- },
- "indent": []
- }
- }
- ]
- },
- {
- "depth": 1,
- "type": "heading",
- "children": [
- {
- "type": "text",
- "value": "getTheTime"
- }
- ]
- },
- {
- "type": "paragraph",
- "children": [
- {
- "type": "text",
- "value": "Set the time",
- "position": {
- "start": {
- "line": 1,
- "column": 1
- },
- "end": {
- "line": 1,
- "column": 13
- },
- "indent": []
- }
- }
- ],
- "position": {
- "start": {
- "line": 1,
- "column": 1
- },
- "end": {
- "line": 1,
- "column": 13
- },
- "indent": []
- }
- },
- {
- "type": "strong",
- "children": [
- {
- "type": "text",
- "value": "Parameters"
- }
- ]
- },
- {
- "ordered": false,
- "type": "list",
- "children": [
- {
- "type": "listItem",
- "children": [
- {
- "type": "paragraph",
- "children": [
- {
- "type": "inlineCode",
- "value": "time"
- },
- {
- "type": "text",
- "value": " "
- },
- {
- "type": "strong",
- "children": [
- {
- "type": "text",
- "value": "Date"
- }
- ]
- },
- {
- "type": "text",
- "value": " "
- },
- {
- "type": "paragraph",
- "children": [
- {
- "type": "text",
- "value": "the current time",
- "position": {
- "start": {
- "line": 1,
- "column": 1
- },
- "end": {
- "line": 1,
- "column": 17
- },
- "indent": []
- }
- }
- ],
- "position": {
- "start": {
- "line": 1,
- "column": 1
- },
- "end": {
- "line": 1,
- "column": 17
- },
- "indent": []
- }
- }
- ]
- }
- ]
- }
- ]
- },
- {
- "type": "paragraph",
- "children": [
- {
- "type": "text",
- "value": "Returns "
- },
- {
- "type": "strong",
- "children": [
- {
- "type": "text",
- "value": "undefined"
- }
- ]
- },
- {
- "type": "text",
- "value": " "
- },
- {
- "type": "paragraph",
- "children": [
- {
- "type": "text",
- "value": "nothing",
- "position": {
- "start": {
- "line": 1,
- "column": 1
- },
- "end": {
- "line": 1,
- "column": 8
- },
- "indent": []
- }
- }
- ],
- "position": {
- "start": {
- "line": 1,
- "column": 1
- },
- "end": {
- "line": 1,
- "column": 8
- },
- "indent": []
- }
- }
- ]
- }
- ]
-}
\ No newline at end of file
diff --git a/test/fixture/nearby_params.output.custom.md b/test/fixture/nearby_params.output.custom.md
deleted file mode 100644
index 07d5d6ec4..000000000
--- a/test/fixture/nearby_params.output.custom.md
+++ /dev/null
@@ -1,12 +0,0 @@
-# sessions.create
-
-Attempt to establish a cookie-based session in exchange for credentials.
-
-**Parameters**
-
-- `credentials` **object**
- - `credentials.name` **string** Login username. Also accepted as `username` or `email`.
- - `credentials.password` **string** Login password
-- `callback` **[function]** Gets passed `(err, { success:Boolean })`.
-
-Returns **Promise** promise, to be resolved on success or rejected on failure
diff --git a/test/fixture/nearby_params.output.json b/test/fixture/nearby_params.output.json
deleted file mode 100644
index f590bfd32..000000000
--- a/test/fixture/nearby_params.output.json
+++ /dev/null
@@ -1,184 +0,0 @@
-[
- {
- "description": "Attempt to establish a cookie-based session in exchange for credentials.",
- "tags": [
- {
- "title": "function",
- "description": null,
- "lineNumber": 1,
- "name": null
- },
- {
- "title": "name",
- "description": null,
- "lineNumber": 2,
- "name": "sessions.create"
- },
- {
- "title": "param",
- "description": null,
- "lineNumber": 3,
- "type": {
- "type": "NameExpression",
- "name": "object"
- },
- "name": "credentials",
- "properties": [
- {
- "title": "param",
- "description": "Login username. Also accepted as `username` or `email`.",
- "lineNumber": 4,
- "type": {
- "type": "NameExpression",
- "name": "string"
- },
- "name": "credentials.name"
- },
- {
- "title": "param",
- "description": "Login password",
- "lineNumber": 5,
- "type": {
- "type": "NameExpression",
- "name": "string"
- },
- "name": "credentials.password"
- }
- ]
- },
- {
- "title": "param",
- "description": "Login username. Also accepted as `username` or `email`.",
- "lineNumber": 4,
- "type": {
- "type": "NameExpression",
- "name": "string"
- },
- "name": "credentials.name"
- },
- {
- "title": "param",
- "description": "Login password",
- "lineNumber": 5,
- "type": {
- "type": "NameExpression",
- "name": "string"
- },
- "name": "credentials.password"
- },
- {
- "title": "param",
- "description": "Gets passed `(err, { success:Boolean })`.",
- "lineNumber": 6,
- "type": {
- "type": "OptionalType",
- "expression": {
- "type": "NameExpression",
- "name": "function"
- }
- },
- "name": "callback"
- },
- {
- "title": "returns",
- "description": "promise, to be resolved on success or rejected on failure",
- "lineNumber": 7,
- "type": {
- "type": "NameExpression",
- "name": "Promise"
- }
- }
- ],
- "loc": {
- "start": {
- "line": 1,
- "column": 0
- },
- "end": {
- "line": 9,
- "column": 3
- }
- },
- "context": {
- "loc": {
- "start": {
- "line": 10,
- "column": 0
- },
- "end": {
- "line": 14,
- "column": 3
- }
- },
- "code": "/** Attempt to establish a cookie-based session in exchange for credentials.\n * @function\n * @name sessions.create\n * @param {object} credentials\n * @param {string} credentials.name Login username. Also accepted as `username` or `email`.\n * @param {string} credentials.password Login password\n * @param {function} [callback] Gets passed `(err, { success:Boolean })`.\n * @returns {Promise} promise, to be resolved on success or rejected on failure\n */\nsessions.addMethod('create', 'POST / form', {\n // normalize request body params\n before({ body }) {\n }\n});\n"
- },
- "errors": [],
- "function": null,
- "name": "sessions.create",
- "params": [
- {
- "title": "param",
- "description": null,
- "lineNumber": 3,
- "type": {
- "type": "NameExpression",
- "name": "object"
- },
- "name": "credentials",
- "properties": [
- {
- "title": "param",
- "description": "Login username. Also accepted as `username` or `email`.",
- "lineNumber": 4,
- "type": {
- "type": "NameExpression",
- "name": "string"
- },
- "name": "credentials.name"
- },
- {
- "title": "param",
- "description": "Login password",
- "lineNumber": 5,
- "type": {
- "type": "NameExpression",
- "name": "string"
- },
- "name": "credentials.password"
- }
- ]
- },
- {
- "title": "param",
- "description": "Gets passed `(err, { success:Boolean })`.",
- "lineNumber": 6,
- "type": {
- "type": "OptionalType",
- "expression": {
- "type": "NameExpression",
- "name": "function"
- }
- },
- "name": "callback"
- }
- ],
- "returns": [
- {
- "title": "returns",
- "description": "promise, to be resolved on success or rejected on failure",
- "lineNumber": 7,
- "type": {
- "type": "NameExpression",
- "name": "Promise"
- }
- }
- ],
- "members": {
- "instance": [],
- "static": []
- },
- "path": [
- "sessions.create"
- ]
- }
-]
\ No newline at end of file
diff --git a/test/fixture/nearby_params.output.md b/test/fixture/nearby_params.output.md
deleted file mode 100644
index 07d5d6ec4..000000000
--- a/test/fixture/nearby_params.output.md
+++ /dev/null
@@ -1,12 +0,0 @@
-# sessions.create
-
-Attempt to establish a cookie-based session in exchange for credentials.
-
-**Parameters**
-
-- `credentials` **object**
- - `credentials.name` **string** Login username. Also accepted as `username` or `email`.
- - `credentials.password` **string** Login password
-- `callback` **[function]** Gets passed `(err, { success:Boolean })`.
-
-Returns **Promise** promise, to be resolved on success or rejected on failure
diff --git a/test/fixture/nearby_params.output.md.json b/test/fixture/nearby_params.output.md.json
deleted file mode 100644
index b36ede06e..000000000
--- a/test/fixture/nearby_params.output.md.json
+++ /dev/null
@@ -1,427 +0,0 @@
-{
- "type": "root",
- "children": [
- {
- "depth": 1,
- "type": "heading",
- "children": [
- {
- "type": "text",
- "value": "sessions.create"
- }
- ]
- },
- {
- "type": "paragraph",
- "children": [
- {
- "type": "text",
- "value": "Attempt to establish a cookie-based session in exchange for credentials.",
- "position": {
- "start": {
- "line": 1,
- "column": 1
- },
- "end": {
- "line": 1,
- "column": 73
- },
- "indent": []
- }
- }
- ],
- "position": {
- "start": {
- "line": 1,
- "column": 1
- },
- "end": {
- "line": 1,
- "column": 73
- },
- "indent": []
- }
- },
- {
- "type": "strong",
- "children": [
- {
- "type": "text",
- "value": "Parameters"
- }
- ]
- },
- {
- "ordered": false,
- "type": "list",
- "children": [
- {
- "type": "listItem",
- "children": [
- {
- "type": "paragraph",
- "children": [
- {
- "type": "inlineCode",
- "value": "credentials"
- },
- {
- "type": "text",
- "value": " "
- },
- {
- "type": "strong",
- "children": [
- {
- "type": "text",
- "value": "object"
- }
- ]
- },
- {
- "type": "text",
- "value": " "
- }
- ]
- },
- {
- "ordered": false,
- "type": "list",
- "children": [
- {
- "type": "listItem",
- "children": [
- {
- "type": "paragraph",
- "children": [
- {
- "type": "inlineCode",
- "value": "credentials.name"
- },
- {
- "type": "text",
- "value": " "
- },
- {
- "type": "strong",
- "children": [
- {
- "type": "text",
- "value": "string"
- }
- ]
- },
- {
- "type": "text",
- "value": " "
- },
- {
- "type": "paragraph",
- "children": [
- {
- "type": "text",
- "value": "Login username. Also accepted as ",
- "position": {
- "start": {
- "line": 1,
- "column": 1
- },
- "end": {
- "line": 1,
- "column": 34
- },
- "indent": []
- }
- },
- {
- "type": "inlineCode",
- "value": "username",
- "position": {
- "start": {
- "line": 1,
- "column": 34
- },
- "end": {
- "line": 1,
- "column": 44
- },
- "indent": []
- }
- },
- {
- "type": "text",
- "value": " or ",
- "position": {
- "start": {
- "line": 1,
- "column": 44
- },
- "end": {
- "line": 1,
- "column": 48
- },
- "indent": []
- }
- },
- {
- "type": "inlineCode",
- "value": "email",
- "position": {
- "start": {
- "line": 1,
- "column": 48
- },
- "end": {
- "line": 1,
- "column": 55
- },
- "indent": []
- }
- },
- {
- "type": "text",
- "value": ".",
- "position": {
- "start": {
- "line": 1,
- "column": 55
- },
- "end": {
- "line": 1,
- "column": 56
- },
- "indent": []
- }
- }
- ],
- "position": {
- "start": {
- "line": 1,
- "column": 1
- },
- "end": {
- "line": 1,
- "column": 56
- },
- "indent": []
- }
- }
- ]
- }
- ]
- },
- {
- "type": "listItem",
- "children": [
- {
- "type": "paragraph",
- "children": [
- {
- "type": "inlineCode",
- "value": "credentials.password"
- },
- {
- "type": "text",
- "value": " "
- },
- {
- "type": "strong",
- "children": [
- {
- "type": "text",
- "value": "string"
- }
- ]
- },
- {
- "type": "text",
- "value": " "
- },
- {
- "type": "paragraph",
- "children": [
- {
- "type": "text",
- "value": "Login password",
- "position": {
- "start": {
- "line": 1,
- "column": 1
- },
- "end": {
- "line": 1,
- "column": 15
- },
- "indent": []
- }
- }
- ],
- "position": {
- "start": {
- "line": 1,
- "column": 1
- },
- "end": {
- "line": 1,
- "column": 15
- },
- "indent": []
- }
- }
- ]
- }
- ]
- }
- ]
- }
- ]
- },
- {
- "type": "listItem",
- "children": [
- {
- "type": "paragraph",
- "children": [
- {
- "type": "inlineCode",
- "value": "callback"
- },
- {
- "type": "text",
- "value": " "
- },
- {
- "type": "strong",
- "children": [
- {
- "type": "text",
- "value": "[function]"
- }
- ]
- },
- {
- "type": "text",
- "value": " "
- },
- {
- "type": "paragraph",
- "children": [
- {
- "type": "text",
- "value": "Gets passed ",
- "position": {
- "start": {
- "line": 1,
- "column": 1
- },
- "end": {
- "line": 1,
- "column": 13
- },
- "indent": []
- }
- },
- {
- "type": "inlineCode",
- "value": "(err, { success:Boolean })",
- "position": {
- "start": {
- "line": 1,
- "column": 13
- },
- "end": {
- "line": 1,
- "column": 41
- },
- "indent": []
- }
- },
- {
- "type": "text",
- "value": ".",
- "position": {
- "start": {
- "line": 1,
- "column": 41
- },
- "end": {
- "line": 1,
- "column": 42
- },
- "indent": []
- }
- }
- ],
- "position": {
- "start": {
- "line": 1,
- "column": 1
- },
- "end": {
- "line": 1,
- "column": 42
- },
- "indent": []
- }
- }
- ]
- }
- ]
- }
- ]
- },
- {
- "type": "paragraph",
- "children": [
- {
- "type": "text",
- "value": "Returns "
- },
- {
- "type": "strong",
- "children": [
- {
- "type": "text",
- "value": "Promise"
- }
- ]
- },
- {
- "type": "text",
- "value": " "
- },
- {
- "type": "paragraph",
- "children": [
- {
- "type": "text",
- "value": "promise, to be resolved on success or rejected on failure",
- "position": {
- "start": {
- "line": 1,
- "column": 1
- },
- "end": {
- "line": 1,
- "column": 58
- },
- "indent": []
- }
- }
- ],
- "position": {
- "start": {
- "line": 1,
- "column": 1
- },
- "end": {
- "line": 1,
- "column": 58
- },
- "indent": []
- }
- }
- ]
- }
- ]
-}
\ No newline at end of file
diff --git a/test/fixture/nest_params.output.custom.md b/test/fixture/nest_params.output.custom.md
deleted file mode 100644
index 61a9e0998..000000000
--- a/test/fixture/nest_params.output.custom.md
+++ /dev/null
@@ -1,25 +0,0 @@
-# foo
-
-**Parameters**
-
-- `employees` **Array<Object>** The employees who are responsible for the project.
- - `employees[].name` **string** The name of an employee.
- - `employees[].department` **string** The employee's department.
-- `employee`
-
-# foo
-
-**Parameters**
-
-- `options` **Object** some options
- - `options.much` **number** how much
-- `bar` **number** something else
-
-**Properties**
-
-- `theTime` **Object** the current time
- - `theTime.hours` **number**
- - `theTime.minutes` **number**
- - `theTime.seconds` **number**
-
-Returns **Object** foo something else
diff --git a/test/fixture/nest_params.output.json b/test/fixture/nest_params.output.json
deleted file mode 100644
index dac14c74a..000000000
--- a/test/fixture/nest_params.output.json
+++ /dev/null
@@ -1,403 +0,0 @@
-[
- {
- "description": "",
- "tags": [
- {
- "title": "param",
- "description": "The employees who are responsible for the project.",
- "lineNumber": 1,
- "type": {
- "type": "TypeApplication",
- "expression": {
- "type": "NameExpression",
- "name": "Array"
- },
- "applications": [
- {
- "type": "NameExpression",
- "name": "Object"
- }
- ]
- },
- "name": "employees",
- "properties": [
- {
- "title": "param",
- "description": "The name of an employee.",
- "lineNumber": 2,
- "type": {
- "type": "NameExpression",
- "name": "string"
- },
- "name": "employees[].name"
- },
- {
- "title": "param",
- "description": "The employee's department.",
- "lineNumber": 3,
- "type": {
- "type": "NameExpression",
- "name": "string"
- },
- "name": "employees[].department"
- }
- ]
- },
- {
- "title": "param",
- "description": "The name of an employee.",
- "lineNumber": 2,
- "type": {
- "type": "NameExpression",
- "name": "string"
- },
- "name": "employees[].name"
- },
- {
- "title": "param",
- "description": "The employee's department.",
- "lineNumber": 3,
- "type": {
- "type": "NameExpression",
- "name": "string"
- },
- "name": "employees[].department"
- }
- ],
- "loc": {
- "start": {
- "line": 1,
- "column": 0
- },
- "end": {
- "line": 5,
- "column": 3
- }
- },
- "context": {
- "loc": {
- "start": {
- "line": 6,
- "column": 0
- },
- "end": {
- "line": 7,
- "column": 1
- }
- },
- "code": "/**\n * @param {Object[]} employees - The employees who are responsible for the project.\n * @param {string} employees[].name - The name of an employee.\n * @param {string} employees[].department - The employee's department.\n */\nfunction foo(employee) {\n}\n\n/**\n * @name foo\n * @param {Object} options some options\n * @param {number} options.much how much\n * @param {number} bar something else\n * @property {Object} theTime the current time\n * @property {number} theTime.hours\n * @property {number} theTime.minutes\n * @property {number} theTime.seconds\n * @returns {Object} foo something else\n */\n"
- },
- "errors": [],
- "params": [
- {
- "title": "param",
- "description": "The employees who are responsible for the project.",
- "lineNumber": 1,
- "type": {
- "type": "TypeApplication",
- "expression": {
- "type": "NameExpression",
- "name": "Array"
- },
- "applications": [
- {
- "type": "NameExpression",
- "name": "Object"
- }
- ]
- },
- "name": "employees",
- "properties": [
- {
- "title": "param",
- "description": "The name of an employee.",
- "lineNumber": 2,
- "type": {
- "type": "NameExpression",
- "name": "string"
- },
- "name": "employees[].name"
- },
- {
- "title": "param",
- "description": "The employee's department.",
- "lineNumber": 3,
- "type": {
- "type": "NameExpression",
- "name": "string"
- },
- "name": "employees[].department"
- }
- ]
- },
- {
- "title": "param",
- "name": "employee",
- "lineNumber": 6
- }
- ],
- "name": "foo",
- "kind": "function",
- "members": {
- "instance": [],
- "static": []
- },
- "path": [
- "foo"
- ]
- },
- {
- "description": "",
- "tags": [
- {
- "title": "name",
- "description": null,
- "lineNumber": 1,
- "name": "foo"
- },
- {
- "title": "param",
- "description": "some options",
- "lineNumber": 2,
- "type": {
- "type": "NameExpression",
- "name": "Object"
- },
- "name": "options",
- "properties": [
- {
- "title": "param",
- "description": "how much",
- "lineNumber": 3,
- "type": {
- "type": "NameExpression",
- "name": "number"
- },
- "name": "options.much"
- }
- ]
- },
- {
- "title": "param",
- "description": "how much",
- "lineNumber": 3,
- "type": {
- "type": "NameExpression",
- "name": "number"
- },
- "name": "options.much"
- },
- {
- "title": "param",
- "description": "something else",
- "lineNumber": 4,
- "type": {
- "type": "NameExpression",
- "name": "number"
- },
- "name": "bar"
- },
- {
- "title": "property",
- "description": "the current time",
- "lineNumber": 5,
- "type": {
- "type": "NameExpression",
- "name": "Object"
- },
- "name": "theTime",
- "properties": [
- {
- "title": "property",
- "description": null,
- "lineNumber": 6,
- "type": {
- "type": "NameExpression",
- "name": "number"
- },
- "name": "theTime.hours"
- },
- {
- "title": "property",
- "description": null,
- "lineNumber": 7,
- "type": {
- "type": "NameExpression",
- "name": "number"
- },
- "name": "theTime.minutes"
- },
- {
- "title": "property",
- "description": null,
- "lineNumber": 8,
- "type": {
- "type": "NameExpression",
- "name": "number"
- },
- "name": "theTime.seconds"
- }
- ]
- },
- {
- "title": "property",
- "description": null,
- "lineNumber": 6,
- "type": {
- "type": "NameExpression",
- "name": "number"
- },
- "name": "theTime.hours"
- },
- {
- "title": "property",
- "description": null,
- "lineNumber": 7,
- "type": {
- "type": "NameExpression",
- "name": "number"
- },
- "name": "theTime.minutes"
- },
- {
- "title": "property",
- "description": null,
- "lineNumber": 8,
- "type": {
- "type": "NameExpression",
- "name": "number"
- },
- "name": "theTime.seconds"
- },
- {
- "title": "returns",
- "description": "foo something else",
- "lineNumber": 9,
- "type": {
- "type": "NameExpression",
- "name": "Object"
- }
- }
- ],
- "loc": {
- "start": {
- "line": 9,
- "column": 0
- },
- "end": {
- "line": 19,
- "column": 3
- }
- },
- "context": {
- "loc": {
- "start": {
- "line": 6,
- "column": 0
- },
- "end": {
- "line": 7,
- "column": 1
- }
- }
- },
- "errors": [],
- "name": "foo",
- "params": [
- {
- "title": "param",
- "description": "some options",
- "lineNumber": 2,
- "type": {
- "type": "NameExpression",
- "name": "Object"
- },
- "name": "options",
- "properties": [
- {
- "title": "param",
- "description": "how much",
- "lineNumber": 3,
- "type": {
- "type": "NameExpression",
- "name": "number"
- },
- "name": "options.much"
- }
- ]
- },
- {
- "title": "param",
- "description": "something else",
- "lineNumber": 4,
- "type": {
- "type": "NameExpression",
- "name": "number"
- },
- "name": "bar"
- }
- ],
- "properties": [
- {
- "title": "property",
- "description": "the current time",
- "lineNumber": 5,
- "type": {
- "type": "NameExpression",
- "name": "Object"
- },
- "name": "theTime",
- "properties": [
- {
- "title": "property",
- "description": null,
- "lineNumber": 6,
- "type": {
- "type": "NameExpression",
- "name": "number"
- },
- "name": "theTime.hours"
- },
- {
- "title": "property",
- "description": null,
- "lineNumber": 7,
- "type": {
- "type": "NameExpression",
- "name": "number"
- },
- "name": "theTime.minutes"
- },
- {
- "title": "property",
- "description": null,
- "lineNumber": 8,
- "type": {
- "type": "NameExpression",
- "name": "number"
- },
- "name": "theTime.seconds"
- }
- ]
- }
- ],
- "returns": [
- {
- "title": "returns",
- "description": "foo something else",
- "lineNumber": 9,
- "type": {
- "type": "NameExpression",
- "name": "Object"
- }
- }
- ],
- "members": {
- "instance": [],
- "static": []
- },
- "path": [
- "foo"
- ]
- }
-]
\ No newline at end of file
diff --git a/test/fixture/nest_params.output.md b/test/fixture/nest_params.output.md
deleted file mode 100644
index 61a9e0998..000000000
--- a/test/fixture/nest_params.output.md
+++ /dev/null
@@ -1,25 +0,0 @@
-# foo
-
-**Parameters**
-
-- `employees` **Array<Object>** The employees who are responsible for the project.
- - `employees[].name` **string** The name of an employee.
- - `employees[].department` **string** The employee's department.
-- `employee`
-
-# foo
-
-**Parameters**
-
-- `options` **Object** some options
- - `options.much` **number** how much
-- `bar` **number** something else
-
-**Properties**
-
-- `theTime` **Object** the current time
- - `theTime.hours` **number**
- - `theTime.minutes` **number**
- - `theTime.seconds` **number**
-
-Returns **Object** foo something else
diff --git a/test/fixture/nest_params.output.md.json b/test/fixture/nest_params.output.md.json
deleted file mode 100644
index 7282f0130..000000000
--- a/test/fixture/nest_params.output.md.json
+++ /dev/null
@@ -1,690 +0,0 @@
-{
- "type": "root",
- "children": [
- {
- "depth": 1,
- "type": "heading",
- "children": [
- {
- "type": "text",
- "value": "foo"
- }
- ]
- },
- {
- "type": "strong",
- "children": [
- {
- "type": "text",
- "value": "Parameters"
- }
- ]
- },
- {
- "ordered": false,
- "type": "list",
- "children": [
- {
- "type": "listItem",
- "children": [
- {
- "type": "paragraph",
- "children": [
- {
- "type": "inlineCode",
- "value": "employees"
- },
- {
- "type": "text",
- "value": " "
- },
- {
- "type": "strong",
- "children": [
- {
- "type": "text",
- "value": "Array<Object>"
- }
- ]
- },
- {
- "type": "text",
- "value": " "
- },
- {
- "type": "paragraph",
- "children": [
- {
- "type": "text",
- "value": "The employees who are responsible for the project.",
- "position": {
- "start": {
- "line": 1,
- "column": 1
- },
- "end": {
- "line": 1,
- "column": 51
- },
- "indent": []
- }
- }
- ],
- "position": {
- "start": {
- "line": 1,
- "column": 1
- },
- "end": {
- "line": 1,
- "column": 51
- },
- "indent": []
- }
- }
- ]
- },
- {
- "ordered": false,
- "type": "list",
- "children": [
- {
- "type": "listItem",
- "children": [
- {
- "type": "paragraph",
- "children": [
- {
- "type": "inlineCode",
- "value": "employees[].name"
- },
- {
- "type": "text",
- "value": " "
- },
- {
- "type": "strong",
- "children": [
- {
- "type": "text",
- "value": "string"
- }
- ]
- },
- {
- "type": "text",
- "value": " "
- },
- {
- "type": "paragraph",
- "children": [
- {
- "type": "text",
- "value": "The name of an employee.",
- "position": {
- "start": {
- "line": 1,
- "column": 1
- },
- "end": {
- "line": 1,
- "column": 25
- },
- "indent": []
- }
- }
- ],
- "position": {
- "start": {
- "line": 1,
- "column": 1
- },
- "end": {
- "line": 1,
- "column": 25
- },
- "indent": []
- }
- }
- ]
- }
- ]
- },
- {
- "type": "listItem",
- "children": [
- {
- "type": "paragraph",
- "children": [
- {
- "type": "inlineCode",
- "value": "employees[].department"
- },
- {
- "type": "text",
- "value": " "
- },
- {
- "type": "strong",
- "children": [
- {
- "type": "text",
- "value": "string"
- }
- ]
- },
- {
- "type": "text",
- "value": " "
- },
- {
- "type": "paragraph",
- "children": [
- {
- "type": "text",
- "value": "The employee's department.",
- "position": {
- "start": {
- "line": 1,
- "column": 1
- },
- "end": {
- "line": 1,
- "column": 27
- },
- "indent": []
- }
- }
- ],
- "position": {
- "start": {
- "line": 1,
- "column": 1
- },
- "end": {
- "line": 1,
- "column": 27
- },
- "indent": []
- }
- }
- ]
- }
- ]
- }
- ]
- }
- ]
- },
- {
- "type": "listItem",
- "children": [
- {
- "type": "paragraph",
- "children": [
- {
- "type": "inlineCode",
- "value": "employee"
- },
- {
- "type": "text",
- "value": " "
- },
- {
- "type": "text",
- "value": " "
- }
- ]
- }
- ]
- }
- ]
- },
- {
- "depth": 1,
- "type": "heading",
- "children": [
- {
- "type": "text",
- "value": "foo"
- }
- ]
- },
- {
- "type": "strong",
- "children": [
- {
- "type": "text",
- "value": "Parameters"
- }
- ]
- },
- {
- "ordered": false,
- "type": "list",
- "children": [
- {
- "type": "listItem",
- "children": [
- {
- "type": "paragraph",
- "children": [
- {
- "type": "inlineCode",
- "value": "options"
- },
- {
- "type": "text",
- "value": " "
- },
- {
- "type": "strong",
- "children": [
- {
- "type": "text",
- "value": "Object"
- }
- ]
- },
- {
- "type": "text",
- "value": " "
- },
- {
- "type": "paragraph",
- "children": [
- {
- "type": "text",
- "value": "some options",
- "position": {
- "start": {
- "line": 1,
- "column": 1
- },
- "end": {
- "line": 1,
- "column": 13
- },
- "indent": []
- }
- }
- ],
- "position": {
- "start": {
- "line": 1,
- "column": 1
- },
- "end": {
- "line": 1,
- "column": 13
- },
- "indent": []
- }
- }
- ]
- },
- {
- "ordered": false,
- "type": "list",
- "children": [
- {
- "type": "listItem",
- "children": [
- {
- "type": "paragraph",
- "children": [
- {
- "type": "inlineCode",
- "value": "options.much"
- },
- {
- "type": "text",
- "value": " "
- },
- {
- "type": "strong",
- "children": [
- {
- "type": "text",
- "value": "number"
- }
- ]
- },
- {
- "type": "text",
- "value": " "
- },
- {
- "type": "paragraph",
- "children": [
- {
- "type": "text",
- "value": "how much",
- "position": {
- "start": {
- "line": 1,
- "column": 1
- },
- "end": {
- "line": 1,
- "column": 9
- },
- "indent": []
- }
- }
- ],
- "position": {
- "start": {
- "line": 1,
- "column": 1
- },
- "end": {
- "line": 1,
- "column": 9
- },
- "indent": []
- }
- }
- ]
- }
- ]
- }
- ]
- }
- ]
- },
- {
- "type": "listItem",
- "children": [
- {
- "type": "paragraph",
- "children": [
- {
- "type": "inlineCode",
- "value": "bar"
- },
- {
- "type": "text",
- "value": " "
- },
- {
- "type": "strong",
- "children": [
- {
- "type": "text",
- "value": "number"
- }
- ]
- },
- {
- "type": "text",
- "value": " "
- },
- {
- "type": "paragraph",
- "children": [
- {
- "type": "text",
- "value": "something else",
- "position": {
- "start": {
- "line": 1,
- "column": 1
- },
- "end": {
- "line": 1,
- "column": 15
- },
- "indent": []
- }
- }
- ],
- "position": {
- "start": {
- "line": 1,
- "column": 1
- },
- "end": {
- "line": 1,
- "column": 15
- },
- "indent": []
- }
- }
- ]
- }
- ]
- }
- ]
- },
- {
- "type": "strong",
- "children": [
- {
- "type": "text",
- "value": "Properties"
- }
- ]
- },
- {
- "ordered": false,
- "type": "list",
- "children": [
- {
- "type": "listItem",
- "children": [
- {
- "type": "paragraph",
- "children": [
- {
- "type": "inlineCode",
- "value": "theTime"
- },
- {
- "type": "text",
- "value": " "
- },
- {
- "type": "strong",
- "children": [
- {
- "type": "text",
- "value": "Object"
- }
- ]
- },
- {
- "type": "text",
- "value": " "
- },
- {
- "type": "paragraph",
- "children": [
- {
- "type": "text",
- "value": "the current time",
- "position": {
- "start": {
- "line": 1,
- "column": 1
- },
- "end": {
- "line": 1,
- "column": 17
- },
- "indent": []
- }
- }
- ],
- "position": {
- "start": {
- "line": 1,
- "column": 1
- },
- "end": {
- "line": 1,
- "column": 17
- },
- "indent": []
- }
- }
- ]
- },
- {
- "ordered": false,
- "type": "list",
- "children": [
- {
- "type": "listItem",
- "children": [
- {
- "type": "paragraph",
- "children": [
- {
- "type": "inlineCode",
- "value": "theTime.hours"
- },
- {
- "type": "text",
- "value": " "
- },
- {
- "type": "strong",
- "children": [
- {
- "type": "text",
- "value": "number"
- }
- ]
- },
- {
- "type": "text",
- "value": " "
- }
- ]
- }
- ]
- },
- {
- "type": "listItem",
- "children": [
- {
- "type": "paragraph",
- "children": [
- {
- "type": "inlineCode",
- "value": "theTime.minutes"
- },
- {
- "type": "text",
- "value": " "
- },
- {
- "type": "strong",
- "children": [
- {
- "type": "text",
- "value": "number"
- }
- ]
- },
- {
- "type": "text",
- "value": " "
- }
- ]
- }
- ]
- },
- {
- "type": "listItem",
- "children": [
- {
- "type": "paragraph",
- "children": [
- {
- "type": "inlineCode",
- "value": "theTime.seconds"
- },
- {
- "type": "text",
- "value": " "
- },
- {
- "type": "strong",
- "children": [
- {
- "type": "text",
- "value": "number"
- }
- ]
- },
- {
- "type": "text",
- "value": " "
- }
- ]
- }
- ]
- }
- ]
- }
- ]
- }
- ]
- },
- {
- "type": "paragraph",
- "children": [
- {
- "type": "text",
- "value": "Returns "
- },
- {
- "type": "strong",
- "children": [
- {
- "type": "text",
- "value": "Object"
- }
- ]
- },
- {
- "type": "text",
- "value": " "
- },
- {
- "type": "paragraph",
- "children": [
- {
- "type": "text",
- "value": "foo something else",
- "position": {
- "start": {
- "line": 1,
- "column": 1
- },
- "end": {
- "line": 1,
- "column": 19
- },
- "indent": []
- }
- }
- ],
- "position": {
- "start": {
- "line": 1,
- "column": 1
- },
- "end": {
- "line": 1,
- "column": 19
- },
- "indent": []
- }
- }
- ]
- }
- ]
-}
\ No newline at end of file
diff --git a/test/fixture/newline-in-description.output.custom.md b/test/fixture/newline-in-description.output.custom.md
deleted file mode 100644
index ee3e41cee..000000000
--- a/test/fixture/newline-in-description.output.custom.md
+++ /dev/null
@@ -1,9 +0,0 @@
-#
-
-A function.
-
-**Parameters**
-
-- `a` **Number** The input to the function.
- I should be able to continue the description on a new line, and have it
- still work in the markdown table.
diff --git a/test/fixture/newline-in-description.output.json b/test/fixture/newline-in-description.output.json
deleted file mode 100644
index 5ec1a8780..000000000
--- a/test/fixture/newline-in-description.output.json
+++ /dev/null
@@ -1,63 +0,0 @@
-[
- {
- "description": "A function.",
- "tags": [
- {
- "title": "param",
- "description": "The input to the function.\nI should be able to continue the description on a new line, and have it\nstill work in the markdown table.",
- "lineNumber": 2,
- "type": {
- "type": "NameExpression",
- "name": "Number"
- },
- "name": "a"
- }
- ],
- "loc": {
- "start": {
- "line": 1,
- "column": 0
- },
- "end": {
- "line": 6,
- "column": 3
- }
- },
- "context": {
- "loc": {
- "start": {
- "line": 1,
- "column": 0
- },
- "end": {
- "line": 7,
- "column": 0
- }
- }
- },
- "errors": [
- {
- "message": "could not determine @name for hierarchy"
- }
- ],
- "params": [
- {
- "title": "param",
- "description": "The input to the function.\nI should be able to continue the description on a new line, and have it\nstill work in the markdown table.",
- "lineNumber": 2,
- "type": {
- "type": "NameExpression",
- "name": "Number"
- },
- "name": "a"
- }
- ],
- "members": {
- "instance": [],
- "static": []
- },
- "path": [
- null
- ]
- }
-]
\ No newline at end of file
diff --git a/test/fixture/newline-in-description.output.md b/test/fixture/newline-in-description.output.md
deleted file mode 100644
index ee3e41cee..000000000
--- a/test/fixture/newline-in-description.output.md
+++ /dev/null
@@ -1,9 +0,0 @@
-#
-
-A function.
-
-**Parameters**
-
-- `a` **Number** The input to the function.
- I should be able to continue the description on a new line, and have it
- still work in the markdown table.
diff --git a/test/fixture/newline-in-description.output.md.json b/test/fixture/newline-in-description.output.md.json
deleted file mode 100644
index 8ee8c8abb..000000000
--- a/test/fixture/newline-in-description.output.md.json
+++ /dev/null
@@ -1,128 +0,0 @@
-{
- "type": "root",
- "children": [
- {
- "depth": 1,
- "type": "heading",
- "children": [
- {
- "type": "text"
- }
- ]
- },
- {
- "type": "paragraph",
- "children": [
- {
- "type": "text",
- "value": "A function.",
- "position": {
- "start": {
- "line": 1,
- "column": 1
- },
- "end": {
- "line": 1,
- "column": 12
- },
- "indent": []
- }
- }
- ],
- "position": {
- "start": {
- "line": 1,
- "column": 1
- },
- "end": {
- "line": 1,
- "column": 12
- },
- "indent": []
- }
- },
- {
- "type": "strong",
- "children": [
- {
- "type": "text",
- "value": "Parameters"
- }
- ]
- },
- {
- "ordered": false,
- "type": "list",
- "children": [
- {
- "type": "listItem",
- "children": [
- {
- "type": "paragraph",
- "children": [
- {
- "type": "inlineCode",
- "value": "a"
- },
- {
- "type": "text",
- "value": " "
- },
- {
- "type": "strong",
- "children": [
- {
- "type": "text",
- "value": "Number"
- }
- ]
- },
- {
- "type": "text",
- "value": " "
- },
- {
- "type": "paragraph",
- "children": [
- {
- "type": "text",
- "value": "The input to the function.\nI should be able to continue the description on a new line, and have it\nstill work in the markdown table.",
- "position": {
- "start": {
- "line": 1,
- "column": 1
- },
- "end": {
- "line": 3,
- "column": 34
- },
- "indent": [
- 1,
- 1
- ]
- }
- }
- ],
- "position": {
- "start": {
- "line": 1,
- "column": 1
- },
- "end": {
- "line": 3,
- "column": 34
- },
- "indent": [
- 1,
- 1
- ]
- }
- }
- ]
- }
- ]
- }
- ]
- }
- ]
-}
\ No newline at end of file
diff --git a/test/fixture/no-name.output.custom.md b/test/fixture/no-name.output.custom.md
deleted file mode 100644
index 6d3a039fd..000000000
--- a/test/fixture/no-name.output.custom.md
+++ /dev/null
@@ -1,7 +0,0 @@
-#
-
-Set the time
-
-**Parameters**
-
-- `bar` **number**
diff --git a/test/fixture/no-name.output.json b/test/fixture/no-name.output.json
deleted file mode 100644
index aec8d1d2e..000000000
--- a/test/fixture/no-name.output.json
+++ /dev/null
@@ -1,63 +0,0 @@
-[
- {
- "description": "Set the time",
- "tags": [
- {
- "title": "param",
- "description": null,
- "lineNumber": 2,
- "type": {
- "type": "NameExpression",
- "name": "number"
- },
- "name": "bar"
- }
- ],
- "loc": {
- "start": {
- "line": 1,
- "column": 0
- },
- "end": {
- "line": 4,
- "column": 3
- }
- },
- "context": {
- "loc": {
- "start": {
- "line": 1,
- "column": 0
- },
- "end": {
- "line": 5,
- "column": 0
- }
- }
- },
- "errors": [
- {
- "message": "could not determine @name for hierarchy"
- }
- ],
- "params": [
- {
- "title": "param",
- "description": null,
- "lineNumber": 2,
- "type": {
- "type": "NameExpression",
- "name": "number"
- },
- "name": "bar"
- }
- ],
- "members": {
- "instance": [],
- "static": []
- },
- "path": [
- null
- ]
- }
-]
\ No newline at end of file
diff --git a/test/fixture/no-name.output.md b/test/fixture/no-name.output.md
deleted file mode 100644
index 6d3a039fd..000000000
--- a/test/fixture/no-name.output.md
+++ /dev/null
@@ -1,7 +0,0 @@
-#
-
-Set the time
-
-**Parameters**
-
-- `bar` **number**
diff --git a/test/fixture/no-name.output.md.json b/test/fixture/no-name.output.md.json
deleted file mode 100644
index 3ca1c8b2b..000000000
--- a/test/fixture/no-name.output.md.json
+++ /dev/null
@@ -1,91 +0,0 @@
-{
- "type": "root",
- "children": [
- {
- "depth": 1,
- "type": "heading",
- "children": [
- {
- "type": "text"
- }
- ]
- },
- {
- "type": "paragraph",
- "children": [
- {
- "type": "text",
- "value": "Set the time",
- "position": {
- "start": {
- "line": 1,
- "column": 1
- },
- "end": {
- "line": 1,
- "column": 13
- },
- "indent": []
- }
- }
- ],
- "position": {
- "start": {
- "line": 1,
- "column": 1
- },
- "end": {
- "line": 1,
- "column": 13
- },
- "indent": []
- }
- },
- {
- "type": "strong",
- "children": [
- {
- "type": "text",
- "value": "Parameters"
- }
- ]
- },
- {
- "ordered": false,
- "type": "list",
- "children": [
- {
- "type": "listItem",
- "children": [
- {
- "type": "paragraph",
- "children": [
- {
- "type": "inlineCode",
- "value": "bar"
- },
- {
- "type": "text",
- "value": " "
- },
- {
- "type": "strong",
- "children": [
- {
- "type": "text",
- "value": "number"
- }
- ]
- },
- {
- "type": "text",
- "value": " "
- }
- ]
- }
- ]
- }
- ]
- }
- ]
-}
\ No newline at end of file
diff --git a/test/fixture/optional.input.js b/test/fixture/optional.input.js
deleted file mode 100644
index 2f8d1f2bc..000000000
--- a/test/fixture/optional.input.js
+++ /dev/null
@@ -1,10 +0,0 @@
-/**
- * Represents an IPv6 address
- * @class Address6
- * @param {string} address - An IPv6 address string
- * @param {number} [groups=8] - How many octets to parse
- * @param {?number} third - A third argument
- * @param {Array} [foo=[1]] to properly be parsed
- * @example
- * var address = new Address6('2001::/32');
- */
diff --git a/test/fixture/optional.output.custom.md b/test/fixture/optional.output.custom.md
deleted file mode 100644
index fe4a2e3e6..000000000
--- a/test/fixture/optional.output.custom.md
+++ /dev/null
@@ -1,16 +0,0 @@
-# Address6
-
-Represents an IPv6 address
-
-**Parameters**
-
-- `address` **string** An IPv6 address string
-- `groups` **[number]** How many octets to parse (optional, default `8`)
-- `third` **[number]** A third argument
-- `foo` **[Array]** to properly be parsed (optional, default `[1]`)
-
-**Examples**
-
-```javascript
-var address = new Address6('2001::/32');
-```
diff --git a/test/fixture/optional.output.json b/test/fixture/optional.output.json
deleted file mode 100644
index 564d65d58..000000000
--- a/test/fixture/optional.output.json
+++ /dev/null
@@ -1,163 +0,0 @@
-[
- {
- "description": "Represents an IPv6 address",
- "tags": [
- {
- "title": "class",
- "description": null,
- "lineNumber": 2,
- "type": null,
- "name": "Address6"
- },
- {
- "title": "param",
- "description": "An IPv6 address string",
- "lineNumber": 3,
- "type": {
- "type": "NameExpression",
- "name": "string"
- },
- "name": "address"
- },
- {
- "title": "param",
- "description": "How many octets to parse",
- "lineNumber": 4,
- "type": {
- "type": "OptionalType",
- "expression": {
- "type": "NameExpression",
- "name": "number"
- }
- },
- "name": "groups",
- "default": "8"
- },
- {
- "title": "param",
- "description": "A third argument",
- "lineNumber": 5,
- "type": {
- "type": "NullableType",
- "expression": {
- "type": "NameExpression",
- "name": "number"
- },
- "prefix": true
- },
- "name": "third"
- },
- {
- "title": "param",
- "description": "to properly be parsed",
- "lineNumber": 6,
- "type": {
- "type": "OptionalType",
- "expression": {
- "type": "NameExpression",
- "name": "Array"
- }
- },
- "name": "foo",
- "default": "[1]"
- },
- {
- "title": "example",
- "description": "var address = new Address6('2001::/32');",
- "lineNumber": 7
- }
- ],
- "loc": {
- "start": {
- "line": 1,
- "column": 0
- },
- "end": {
- "line": 10,
- "column": 3
- }
- },
- "context": {
- "loc": {
- "start": {
- "line": 1,
- "column": 0
- },
- "end": {
- "line": 11,
- "column": 0
- }
- }
- },
- "errors": [],
- "class": {
- "name": "Address6"
- },
- "params": [
- {
- "title": "param",
- "description": "An IPv6 address string",
- "lineNumber": 3,
- "type": {
- "type": "NameExpression",
- "name": "string"
- },
- "name": "address"
- },
- {
- "title": "param",
- "description": "How many octets to parse",
- "lineNumber": 4,
- "type": {
- "type": "OptionalType",
- "expression": {
- "type": "NameExpression",
- "name": "number"
- }
- },
- "name": "groups",
- "default": "8"
- },
- {
- "title": "param",
- "description": "A third argument",
- "lineNumber": 5,
- "type": {
- "type": "NullableType",
- "expression": {
- "type": "NameExpression",
- "name": "number"
- },
- "prefix": true
- },
- "name": "third"
- },
- {
- "title": "param",
- "description": "to properly be parsed",
- "lineNumber": 6,
- "type": {
- "type": "OptionalType",
- "expression": {
- "type": "NameExpression",
- "name": "Array"
- }
- },
- "name": "foo",
- "default": "[1]"
- }
- ],
- "examples": [
- "var address = new Address6('2001::/32');"
- ],
- "name": "Address6",
- "kind": "class",
- "members": {
- "instance": [],
- "static": []
- },
- "path": [
- "Address6"
- ]
- }
-]
\ No newline at end of file
diff --git a/test/fixture/optional.output.md b/test/fixture/optional.output.md
deleted file mode 100644
index fe4a2e3e6..000000000
--- a/test/fixture/optional.output.md
+++ /dev/null
@@ -1,16 +0,0 @@
-# Address6
-
-Represents an IPv6 address
-
-**Parameters**
-
-- `address` **string** An IPv6 address string
-- `groups` **[number]** How many octets to parse (optional, default `8`)
-- `third` **[number]** A third argument
-- `foo` **[Array]** to properly be parsed (optional, default `[1]`)
-
-**Examples**
-
-```javascript
-var address = new Address6('2001::/32');
-```
diff --git a/test/fixture/optional.output.md.json b/test/fixture/optional.output.md.json
deleted file mode 100644
index 38bd40b42..000000000
--- a/test/fixture/optional.output.md.json
+++ /dev/null
@@ -1,357 +0,0 @@
-{
- "type": "root",
- "children": [
- {
- "depth": 1,
- "type": "heading",
- "children": [
- {
- "type": "text",
- "value": "Address6"
- }
- ]
- },
- {
- "type": "paragraph",
- "children": [
- {
- "type": "text",
- "value": "Represents an IPv6 address",
- "position": {
- "start": {
- "line": 1,
- "column": 1
- },
- "end": {
- "line": 1,
- "column": 27
- },
- "indent": []
- }
- }
- ],
- "position": {
- "start": {
- "line": 1,
- "column": 1
- },
- "end": {
- "line": 1,
- "column": 27
- },
- "indent": []
- }
- },
- {
- "type": "strong",
- "children": [
- {
- "type": "text",
- "value": "Parameters"
- }
- ]
- },
- {
- "ordered": false,
- "type": "list",
- "children": [
- {
- "type": "listItem",
- "children": [
- {
- "type": "paragraph",
- "children": [
- {
- "type": "inlineCode",
- "value": "address"
- },
- {
- "type": "text",
- "value": " "
- },
- {
- "type": "strong",
- "children": [
- {
- "type": "text",
- "value": "string"
- }
- ]
- },
- {
- "type": "text",
- "value": " "
- },
- {
- "type": "paragraph",
- "children": [
- {
- "type": "text",
- "value": "An IPv6 address string",
- "position": {
- "start": {
- "line": 1,
- "column": 1
- },
- "end": {
- "line": 1,
- "column": 23
- },
- "indent": []
- }
- }
- ],
- "position": {
- "start": {
- "line": 1,
- "column": 1
- },
- "end": {
- "line": 1,
- "column": 23
- },
- "indent": []
- }
- }
- ]
- }
- ]
- },
- {
- "type": "listItem",
- "children": [
- {
- "type": "paragraph",
- "children": [
- {
- "type": "inlineCode",
- "value": "groups"
- },
- {
- "type": "text",
- "value": " "
- },
- {
- "type": "strong",
- "children": [
- {
- "type": "text",
- "value": "[number]"
- }
- ]
- },
- {
- "type": "text",
- "value": " "
- },
- {
- "type": "paragraph",
- "children": [
- {
- "type": "text",
- "value": "How many octets to parse",
- "position": {
- "start": {
- "line": 1,
- "column": 1
- },
- "end": {
- "line": 1,
- "column": 25
- },
- "indent": []
- }
- }
- ],
- "position": {
- "start": {
- "line": 1,
- "column": 1
- },
- "end": {
- "line": 1,
- "column": 25
- },
- "indent": []
- }
- },
- {
- "type": "paragraph",
- "children": [
- {
- "type": "text",
- "value": " (optional, default "
- },
- {
- "type": "inlineCode",
- "value": "8"
- },
- {
- "type": "text",
- "value": ")"
- }
- ]
- }
- ]
- }
- ]
- },
- {
- "type": "listItem",
- "children": [
- {
- "type": "paragraph",
- "children": [
- {
- "type": "inlineCode",
- "value": "third"
- },
- {
- "type": "text",
- "value": " "
- },
- {
- "type": "strong",
- "children": [
- {
- "type": "text",
- "value": "[number]"
- }
- ]
- },
- {
- "type": "text",
- "value": " "
- },
- {
- "type": "paragraph",
- "children": [
- {
- "type": "text",
- "value": "A third argument",
- "position": {
- "start": {
- "line": 1,
- "column": 1
- },
- "end": {
- "line": 1,
- "column": 17
- },
- "indent": []
- }
- }
- ],
- "position": {
- "start": {
- "line": 1,
- "column": 1
- },
- "end": {
- "line": 1,
- "column": 17
- },
- "indent": []
- }
- }
- ]
- }
- ]
- },
- {
- "type": "listItem",
- "children": [
- {
- "type": "paragraph",
- "children": [
- {
- "type": "inlineCode",
- "value": "foo"
- },
- {
- "type": "text",
- "value": " "
- },
- {
- "type": "strong",
- "children": [
- {
- "type": "text",
- "value": "[Array]"
- }
- ]
- },
- {
- "type": "text",
- "value": " "
- },
- {
- "type": "paragraph",
- "children": [
- {
- "type": "text",
- "value": "to properly be parsed",
- "position": {
- "start": {
- "line": 1,
- "column": 1
- },
- "end": {
- "line": 1,
- "column": 22
- },
- "indent": []
- }
- }
- ],
- "position": {
- "start": {
- "line": 1,
- "column": 1
- },
- "end": {
- "line": 1,
- "column": 22
- },
- "indent": []
- }
- },
- {
- "type": "paragraph",
- "children": [
- {
- "type": "text",
- "value": " (optional, default "
- },
- {
- "type": "inlineCode",
- "value": "[1]"
- },
- {
- "type": "text",
- "value": ")"
- }
- ]
- }
- ]
- }
- ]
- }
- ]
- },
- {
- "type": "strong",
- "children": [
- {
- "type": "text",
- "value": "Examples"
- }
- ]
- },
- {
- "lang": "javascript",
- "type": "code",
- "value": "var address = new Address6('2001::/32');"
- }
- ]
-}
\ No newline at end of file
diff --git a/test/fixture/param_nest.input.js b/test/fixture/param_nest.input.js
deleted file mode 100644
index 8ba158445..000000000
--- a/test/fixture/param_nest.input.js
+++ /dev/null
@@ -1,13 +0,0 @@
-/**
- * Create a GeoJSON data source instance given an options object
- * @class GeoJSONSource
- * @param {Object} [options] optional options
- * @param {Object|string} options.data A GeoJSON data object or URL to it.
- * The latter is preferable in case of large GeoJSON files.
- * @param {number} [options.maxzoom=14] Maximum zoom to preserve detail at.
- * @param {number} [options.buffer] Tile buffer on each side.
- * @param {number} [options.tolerance] Simplification tolerance (higher means simpler).
- */
-function GeoJSONSource(options) {
- this.options = options;
-}
diff --git a/test/fixture/param_nest.output.custom.md b/test/fixture/param_nest.output.custom.md
deleted file mode 100644
index 7fb188c3a..000000000
--- a/test/fixture/param_nest.output.custom.md
+++ /dev/null
@@ -1,12 +0,0 @@
-# GeoJSONSource
-
-Create a GeoJSON data source instance given an options object
-
-**Parameters**
-
-- `options` **[Object]** optional options
- - `options.data` **Object or string** A GeoJSON data object or URL to it.
- The latter is preferable in case of large GeoJSON files.
- - `options.maxzoom` **[number]** Maximum zoom to preserve detail at. (optional, default `14`)
- - `options.buffer` **[number]** Tile buffer on each side.
- - `options.tolerance` **[number]** Simplification tolerance (higher means simpler).
diff --git a/test/fixture/param_nest.output.json b/test/fixture/param_nest.output.json
deleted file mode 100644
index e47c64117..000000000
--- a/test/fixture/param_nest.output.json
+++ /dev/null
@@ -1,259 +0,0 @@
-[
- {
- "description": "Create a GeoJSON data source instance given an options object",
- "tags": [
- {
- "title": "class",
- "description": null,
- "lineNumber": 2,
- "type": null,
- "name": "GeoJSONSource"
- },
- {
- "title": "param",
- "description": "optional options",
- "lineNumber": 3,
- "type": {
- "type": "OptionalType",
- "expression": {
- "type": "NameExpression",
- "name": "Object"
- }
- },
- "name": "options",
- "properties": [
- {
- "title": "param",
- "description": "A GeoJSON data object or URL to it.\nThe latter is preferable in case of large GeoJSON files.",
- "lineNumber": 4,
- "type": {
- "type": "UnionType",
- "elements": [
- {
- "type": "NameExpression",
- "name": "Object"
- },
- {
- "type": "NameExpression",
- "name": "string"
- }
- ]
- },
- "name": "options.data"
- },
- {
- "title": "param",
- "description": "Maximum zoom to preserve detail at.",
- "lineNumber": 6,
- "type": {
- "type": "OptionalType",
- "expression": {
- "type": "NameExpression",
- "name": "number"
- }
- },
- "name": "options.maxzoom",
- "default": "14"
- },
- {
- "title": "param",
- "description": "Tile buffer on each side.",
- "lineNumber": 7,
- "type": {
- "type": "OptionalType",
- "expression": {
- "type": "NameExpression",
- "name": "number"
- }
- },
- "name": "options.buffer"
- },
- {
- "title": "param",
- "description": "Simplification tolerance (higher means simpler).",
- "lineNumber": 8,
- "type": {
- "type": "OptionalType",
- "expression": {
- "type": "NameExpression",
- "name": "number"
- }
- },
- "name": "options.tolerance"
- }
- ]
- },
- {
- "title": "param",
- "description": "A GeoJSON data object or URL to it.\nThe latter is preferable in case of large GeoJSON files.",
- "lineNumber": 4,
- "type": {
- "type": "UnionType",
- "elements": [
- {
- "type": "NameExpression",
- "name": "Object"
- },
- {
- "type": "NameExpression",
- "name": "string"
- }
- ]
- },
- "name": "options.data"
- },
- {
- "title": "param",
- "description": "Maximum zoom to preserve detail at.",
- "lineNumber": 6,
- "type": {
- "type": "OptionalType",
- "expression": {
- "type": "NameExpression",
- "name": "number"
- }
- },
- "name": "options.maxzoom",
- "default": "14"
- },
- {
- "title": "param",
- "description": "Tile buffer on each side.",
- "lineNumber": 7,
- "type": {
- "type": "OptionalType",
- "expression": {
- "type": "NameExpression",
- "name": "number"
- }
- },
- "name": "options.buffer"
- },
- {
- "title": "param",
- "description": "Simplification tolerance (higher means simpler).",
- "lineNumber": 8,
- "type": {
- "type": "OptionalType",
- "expression": {
- "type": "NameExpression",
- "name": "number"
- }
- },
- "name": "options.tolerance"
- }
- ],
- "loc": {
- "start": {
- "line": 1,
- "column": 0
- },
- "end": {
- "line": 10,
- "column": 3
- }
- },
- "context": {
- "loc": {
- "start": {
- "line": 11,
- "column": 0
- },
- "end": {
- "line": 13,
- "column": 1
- }
- },
- "code": "/**\n * Create a GeoJSON data source instance given an options object\n * @class GeoJSONSource\n * @param {Object} [options] optional options\n * @param {Object|string} options.data A GeoJSON data object or URL to it.\n * The latter is preferable in case of large GeoJSON files.\n * @param {number} [options.maxzoom=14] Maximum zoom to preserve detail at.\n * @param {number} [options.buffer] Tile buffer on each side.\n * @param {number} [options.tolerance] Simplification tolerance (higher means simpler).\n */\nfunction GeoJSONSource(options) {\n this.options = options;\n}\n"
- },
- "errors": [],
- "class": {
- "name": "GeoJSONSource"
- },
- "params": [
- {
- "title": "param",
- "description": "optional options",
- "lineNumber": 3,
- "type": {
- "type": "OptionalType",
- "expression": {
- "type": "NameExpression",
- "name": "Object"
- }
- },
- "name": "options",
- "properties": [
- {
- "title": "param",
- "description": "A GeoJSON data object or URL to it.\nThe latter is preferable in case of large GeoJSON files.",
- "lineNumber": 4,
- "type": {
- "type": "UnionType",
- "elements": [
- {
- "type": "NameExpression",
- "name": "Object"
- },
- {
- "type": "NameExpression",
- "name": "string"
- }
- ]
- },
- "name": "options.data"
- },
- {
- "title": "param",
- "description": "Maximum zoom to preserve detail at.",
- "lineNumber": 6,
- "type": {
- "type": "OptionalType",
- "expression": {
- "type": "NameExpression",
- "name": "number"
- }
- },
- "name": "options.maxzoom",
- "default": "14"
- },
- {
- "title": "param",
- "description": "Tile buffer on each side.",
- "lineNumber": 7,
- "type": {
- "type": "OptionalType",
- "expression": {
- "type": "NameExpression",
- "name": "number"
- }
- },
- "name": "options.buffer"
- },
- {
- "title": "param",
- "description": "Simplification tolerance (higher means simpler).",
- "lineNumber": 8,
- "type": {
- "type": "OptionalType",
- "expression": {
- "type": "NameExpression",
- "name": "number"
- }
- },
- "name": "options.tolerance"
- }
- ]
- }
- ],
- "name": "GeoJSONSource",
- "kind": "class",
- "members": {
- "instance": [],
- "static": []
- },
- "path": [
- "GeoJSONSource"
- ]
- }
-]
\ No newline at end of file
diff --git a/test/fixture/param_nest.output.md b/test/fixture/param_nest.output.md
deleted file mode 100644
index 7fb188c3a..000000000
--- a/test/fixture/param_nest.output.md
+++ /dev/null
@@ -1,12 +0,0 @@
-# GeoJSONSource
-
-Create a GeoJSON data source instance given an options object
-
-**Parameters**
-
-- `options` **[Object]** optional options
- - `options.data` **Object or string** A GeoJSON data object or URL to it.
- The latter is preferable in case of large GeoJSON files.
- - `options.maxzoom` **[number]** Maximum zoom to preserve detail at. (optional, default `14`)
- - `options.buffer` **[number]** Tile buffer on each side.
- - `options.tolerance` **[number]** Simplification tolerance (higher means simpler).
diff --git a/test/fixture/param_nest.output.md.json b/test/fixture/param_nest.output.md.json
deleted file mode 100644
index 363668e23..000000000
--- a/test/fixture/param_nest.output.md.json
+++ /dev/null
@@ -1,398 +0,0 @@
-{
- "type": "root",
- "children": [
- {
- "depth": 1,
- "type": "heading",
- "children": [
- {
- "type": "text",
- "value": "GeoJSONSource"
- }
- ]
- },
- {
- "type": "paragraph",
- "children": [
- {
- "type": "text",
- "value": "Create a GeoJSON data source instance given an options object",
- "position": {
- "start": {
- "line": 1,
- "column": 1
- },
- "end": {
- "line": 1,
- "column": 62
- },
- "indent": []
- }
- }
- ],
- "position": {
- "start": {
- "line": 1,
- "column": 1
- },
- "end": {
- "line": 1,
- "column": 62
- },
- "indent": []
- }
- },
- {
- "type": "strong",
- "children": [
- {
- "type": "text",
- "value": "Parameters"
- }
- ]
- },
- {
- "ordered": false,
- "type": "list",
- "children": [
- {
- "type": "listItem",
- "children": [
- {
- "type": "paragraph",
- "children": [
- {
- "type": "inlineCode",
- "value": "options"
- },
- {
- "type": "text",
- "value": " "
- },
- {
- "type": "strong",
- "children": [
- {
- "type": "text",
- "value": "[Object]"
- }
- ]
- },
- {
- "type": "text",
- "value": " "
- },
- {
- "type": "paragraph",
- "children": [
- {
- "type": "text",
- "value": "optional options",
- "position": {
- "start": {
- "line": 1,
- "column": 1
- },
- "end": {
- "line": 1,
- "column": 17
- },
- "indent": []
- }
- }
- ],
- "position": {
- "start": {
- "line": 1,
- "column": 1
- },
- "end": {
- "line": 1,
- "column": 17
- },
- "indent": []
- }
- }
- ]
- },
- {
- "ordered": false,
- "type": "list",
- "children": [
- {
- "type": "listItem",
- "children": [
- {
- "type": "paragraph",
- "children": [
- {
- "type": "inlineCode",
- "value": "options.data"
- },
- {
- "type": "text",
- "value": " "
- },
- {
- "type": "strong",
- "children": [
- {
- "type": "text",
- "value": "Object or string"
- }
- ]
- },
- {
- "type": "text",
- "value": " "
- },
- {
- "type": "paragraph",
- "children": [
- {
- "type": "text",
- "value": "A GeoJSON data object or URL to it.\nThe latter is preferable in case of large GeoJSON files.",
- "position": {
- "start": {
- "line": 1,
- "column": 1
- },
- "end": {
- "line": 2,
- "column": 57
- },
- "indent": [
- 1
- ]
- }
- }
- ],
- "position": {
- "start": {
- "line": 1,
- "column": 1
- },
- "end": {
- "line": 2,
- "column": 57
- },
- "indent": [
- 1
- ]
- }
- }
- ]
- }
- ]
- },
- {
- "type": "listItem",
- "children": [
- {
- "type": "paragraph",
- "children": [
- {
- "type": "inlineCode",
- "value": "options.maxzoom"
- },
- {
- "type": "text",
- "value": " "
- },
- {
- "type": "strong",
- "children": [
- {
- "type": "text",
- "value": "[number]"
- }
- ]
- },
- {
- "type": "text",
- "value": " "
- },
- {
- "type": "paragraph",
- "children": [
- {
- "type": "text",
- "value": "Maximum zoom to preserve detail at.",
- "position": {
- "start": {
- "line": 1,
- "column": 1
- },
- "end": {
- "line": 1,
- "column": 36
- },
- "indent": []
- }
- }
- ],
- "position": {
- "start": {
- "line": 1,
- "column": 1
- },
- "end": {
- "line": 1,
- "column": 36
- },
- "indent": []
- }
- },
- {
- "type": "paragraph",
- "children": [
- {
- "type": "text",
- "value": " (optional, default "
- },
- {
- "type": "inlineCode",
- "value": "14"
- },
- {
- "type": "text",
- "value": ")"
- }
- ]
- }
- ]
- }
- ]
- },
- {
- "type": "listItem",
- "children": [
- {
- "type": "paragraph",
- "children": [
- {
- "type": "inlineCode",
- "value": "options.buffer"
- },
- {
- "type": "text",
- "value": " "
- },
- {
- "type": "strong",
- "children": [
- {
- "type": "text",
- "value": "[number]"
- }
- ]
- },
- {
- "type": "text",
- "value": " "
- },
- {
- "type": "paragraph",
- "children": [
- {
- "type": "text",
- "value": "Tile buffer on each side.",
- "position": {
- "start": {
- "line": 1,
- "column": 1
- },
- "end": {
- "line": 1,
- "column": 26
- },
- "indent": []
- }
- }
- ],
- "position": {
- "start": {
- "line": 1,
- "column": 1
- },
- "end": {
- "line": 1,
- "column": 26
- },
- "indent": []
- }
- }
- ]
- }
- ]
- },
- {
- "type": "listItem",
- "children": [
- {
- "type": "paragraph",
- "children": [
- {
- "type": "inlineCode",
- "value": "options.tolerance"
- },
- {
- "type": "text",
- "value": " "
- },
- {
- "type": "strong",
- "children": [
- {
- "type": "text",
- "value": "[number]"
- }
- ]
- },
- {
- "type": "text",
- "value": " "
- },
- {
- "type": "paragraph",
- "children": [
- {
- "type": "text",
- "value": "Simplification tolerance (higher means simpler).",
- "position": {
- "start": {
- "line": 1,
- "column": 1
- },
- "end": {
- "line": 1,
- "column": 49
- },
- "indent": []
- }
- }
- ],
- "position": {
- "start": {
- "line": 1,
- "column": 1
- },
- "end": {
- "line": 1,
- "column": 49
- },
- "indent": []
- }
- }
- ]
- }
- ]
- }
- ]
- }
- ]
- }
- ]
- }
- ]
-}
\ No newline at end of file
diff --git a/test/fixture/partial-default.input.js b/test/fixture/partial-default.input.js
deleted file mode 100644
index 2b34f98fe..000000000
--- a/test/fixture/partial-default.input.js
+++ /dev/null
@@ -1,8 +0,0 @@
-/**
- * Number
- *
- * @param {number} x an argument
- *
- * @returns {number} some
- */
-export const myfunc = (x = 123) => x;
diff --git a/test/fixture/partial-default.output.custom.md b/test/fixture/partial-default.output.custom.md
deleted file mode 100644
index 82e7dd6b6..000000000
--- a/test/fixture/partial-default.output.custom.md
+++ /dev/null
@@ -1,9 +0,0 @@
-# myfunc
-
-Number
-
-**Parameters**
-
-- `x` **number** an argument
-
-Returns **number** some
diff --git a/test/fixture/partial-default.output.json b/test/fixture/partial-default.output.json
deleted file mode 100644
index e146f5176..000000000
--- a/test/fixture/partial-default.output.json
+++ /dev/null
@@ -1,82 +0,0 @@
-[
- {
- "description": "Number",
- "tags": [
- {
- "title": "param",
- "description": "an argument",
- "lineNumber": 3,
- "type": {
- "type": "NameExpression",
- "name": "number"
- },
- "name": "x"
- },
- {
- "title": "returns",
- "description": "some",
- "lineNumber": 5,
- "type": {
- "type": "NameExpression",
- "name": "number"
- }
- }
- ],
- "loc": {
- "start": {
- "line": 1,
- "column": 0
- },
- "end": {
- "line": 7,
- "column": 3
- }
- },
- "context": {
- "loc": {
- "start": {
- "line": 8,
- "column": 0
- },
- "end": {
- "line": 8,
- "column": 37
- }
- },
- "code": "/**\n * Number\n *\n * @param {number} x an argument\n *\n * @returns {number} some\n */\nexport const myfunc = (x = 123) => x;\n"
- },
- "errors": [],
- "params": [
- {
- "title": "param",
- "description": "an argument",
- "lineNumber": 3,
- "type": {
- "type": "NameExpression",
- "name": "number"
- },
- "name": "x"
- }
- ],
- "returns": [
- {
- "title": "returns",
- "description": "some",
- "lineNumber": 5,
- "type": {
- "type": "NameExpression",
- "name": "number"
- }
- }
- ],
- "name": "myfunc",
- "kind": "constant",
- "members": {
- "instance": [],
- "static": []
- },
- "path": [
- "myfunc"
- ]
- }
-]
\ No newline at end of file
diff --git a/test/fixture/partial-default.output.md b/test/fixture/partial-default.output.md
deleted file mode 100644
index 82e7dd6b6..000000000
--- a/test/fixture/partial-default.output.md
+++ /dev/null
@@ -1,9 +0,0 @@
-# myfunc
-
-Number
-
-**Parameters**
-
-- `x` **number** an argument
-
-Returns **number** some
diff --git a/test/fixture/partial-default.output.md.json b/test/fixture/partial-default.output.md.json
deleted file mode 100644
index 9fe928b7c..000000000
--- a/test/fixture/partial-default.output.md.json
+++ /dev/null
@@ -1,176 +0,0 @@
-{
- "type": "root",
- "children": [
- {
- "depth": 1,
- "type": "heading",
- "children": [
- {
- "type": "text",
- "value": "myfunc"
- }
- ]
- },
- {
- "type": "paragraph",
- "children": [
- {
- "type": "text",
- "value": "Number",
- "position": {
- "start": {
- "line": 1,
- "column": 1
- },
- "end": {
- "line": 1,
- "column": 7
- },
- "indent": []
- }
- }
- ],
- "position": {
- "start": {
- "line": 1,
- "column": 1
- },
- "end": {
- "line": 1,
- "column": 7
- },
- "indent": []
- }
- },
- {
- "type": "strong",
- "children": [
- {
- "type": "text",
- "value": "Parameters"
- }
- ]
- },
- {
- "ordered": false,
- "type": "list",
- "children": [
- {
- "type": "listItem",
- "children": [
- {
- "type": "paragraph",
- "children": [
- {
- "type": "inlineCode",
- "value": "x"
- },
- {
- "type": "text",
- "value": " "
- },
- {
- "type": "strong",
- "children": [
- {
- "type": "text",
- "value": "number"
- }
- ]
- },
- {
- "type": "text",
- "value": " "
- },
- {
- "type": "paragraph",
- "children": [
- {
- "type": "text",
- "value": "an argument",
- "position": {
- "start": {
- "line": 1,
- "column": 1
- },
- "end": {
- "line": 1,
- "column": 12
- },
- "indent": []
- }
- }
- ],
- "position": {
- "start": {
- "line": 1,
- "column": 1
- },
- "end": {
- "line": 1,
- "column": 12
- },
- "indent": []
- }
- }
- ]
- }
- ]
- }
- ]
- },
- {
- "type": "paragraph",
- "children": [
- {
- "type": "text",
- "value": "Returns "
- },
- {
- "type": "strong",
- "children": [
- {
- "type": "text",
- "value": "number"
- }
- ]
- },
- {
- "type": "text",
- "value": " "
- },
- {
- "type": "paragraph",
- "children": [
- {
- "type": "text",
- "value": "some",
- "position": {
- "start": {
- "line": 1,
- "column": 1
- },
- "end": {
- "line": 1,
- "column": 5
- },
- "indent": []
- }
- }
- ],
- "position": {
- "start": {
- "line": 1,
- "column": 1
- },
- "end": {
- "line": 1,
- "column": 5
- },
- "indent": []
- }
- }
- ]
- }
- ]
-}
\ No newline at end of file
diff --git a/test/fixture/polyglot/blend.cpp b/test/fixture/polyglot/blend.cpp
deleted file mode 100644
index a285feb9c..000000000
--- a/test/fixture/polyglot/blend.cpp
+++ /dev/null
@@ -1,675 +0,0 @@
-#include
-#include
-#include
-
-#include "zlib.h"
-
-#if defined(HAVE_PNG)
-#include
-#endif
-
-#if defined(HAVE_JPEG)
-#define XMD_H
-#include
-#undef XMD_H
-#endif
-
-#if defined(HAVE_WEBP)
-#include
-#endif
-
-#include "mapnik_palette.hpp"
-#include "blend.hpp"
-#include "tint.hpp"
-
-#include
-#include
-#include
-#include
-
-using namespace v8;
-using namespace node;
-
-namespace node_mapnik {
-
-/**
- * This method moves a hex to a color
- * @name hexToUInt32Color
- * @param {string} hex
- * @returns {number} color
- */
-static bool hexToUInt32Color(char *hex, unsigned int & value) {
- if (!hex) return false;
- int len_original = strlen(hex);
- // Return is the length of the string is less then six
- // otherwise the line after this could go to some other
- // pointer in memory, resulting in strange behaviours.
- if (len_original < 6) return false;
- if (hex[0] == '#') hex++;
- int len = strlen(hex);
- if (len != 6 && len != 8) return false;
-
- unsigned int color = 0;
- std::stringstream ss;
- ss << std::hex << hex;
- ss >> color;
-
- if (len == 8) {
- // Circular shift to get from RGBA to ARGB.
- value = (color << 24) | ((color & 0xFF00) << 8) | ((color & 0xFF0000) >> 8) | ((color & 0xFF000000) >> 24);
- return true;
- } else {
- value = 0xFF000000 | ((color & 0xFF) << 16) | (color & 0xFF00) | ((color & 0xFF0000) >> 16);
- return true;
- }
-}
-
-NAN_METHOD(rgb2hsl) {
- NanScope();
- if (args.Length() != 3) {
- NanThrowTypeError("Please pass r,g,b integer values as three arguments");
- NanReturnUndefined();
- }
- if (!args[0]->IsNumber() || !args[1]->IsNumber() || !args[2]->IsNumber()) {
- NanThrowTypeError("Please pass r,g,b integer values as three arguments");
- NanReturnUndefined();
- }
- unsigned r,g,b;
- r = args[0]->IntegerValue();
- g = args[1]->IntegerValue();
- b = args[2]->IntegerValue();
- Local hsl = NanNew(3);
- double h,s,l;
- rgb_to_hsl(r,g,b,h,s,l);
- hsl->Set(0,NanNew(h));
- hsl->Set(1,NanNew(s));
- hsl->Set(2,NanNew(l));
- NanReturnValue(hsl);
-}
-
-NAN_METHOD(hsl2rgb) {
- NanScope();
- if (args.Length() != 3) {
- NanThrowTypeError("Please pass hsl fractional values as three arguments");
- NanReturnUndefined();
- }
- if (!args[0]->IsNumber() || !args[1]->IsNumber() || !args[2]->IsNumber()) {
- NanThrowTypeError("Please pass hsl fractional values as three arguments");
- NanReturnUndefined();
- }
- double h,s,l;
- h = args[0]->NumberValue();
- s = args[1]->NumberValue();
- l = args[2]->NumberValue();
- Local rgb = NanNew(3);
- unsigned r,g,b;
- hsl_to_rgb(h,s,l,r,g,b);
- rgb->Set(0,NanNew(r));
- rgb->Set(1,NanNew(g));
- rgb->Set(2,NanNew(b));
- NanReturnValue(rgb);
-}
-
-static void parseTintOps(Local const& tint, Tinter & tinter, std::string & msg) {
- NanScope();
- Local hue = tint->Get(NanNew("h"));
- if (!hue.IsEmpty() && hue->IsArray()) {
- Local val_array = Local::Cast(hue);
- if (val_array->Length() != 2) {
- msg = "h array must be a pair of values";
- }
- tinter.h0 = val_array->Get(0)->NumberValue();
- tinter.h1 = val_array->Get(1)->NumberValue();
- }
- Local sat = tint->Get(NanNew("s"));
- if (!sat.IsEmpty() && sat->IsArray()) {
- Local val_array = Local::Cast(sat);
- if (val_array->Length() != 2) {
- msg = "s array must be a pair of values";
- }
- tinter.s0 = val_array->Get(0)->NumberValue();
- tinter.s1 = val_array->Get(1)->NumberValue();
- }
- Local light = tint->Get(NanNew("l"));
- if (!light.IsEmpty() && light->IsArray()) {
- Local val_array = Local::Cast(light);
- if (val_array->Length() != 2) {
- msg = "l array must be a pair of values";
- }
- tinter.l0 = val_array->Get(0)->NumberValue();
- tinter.l1 = val_array->Get(1)->NumberValue();
- }
- Local alpha = tint->Get(NanNew("a"));
- if (!alpha.IsEmpty() && alpha->IsArray()) {
- Local val_array = Local::Cast(alpha);
- if (val_array->Length() != 2) {
- msg = "a array must be a pair of values";
- }
- tinter.a0 = val_array->Get(0)->NumberValue();
- tinter.a1 = val_array->Get(1)->NumberValue();
- }
-}
-
-static inline void Blend_CompositePixel(unsigned int& target, unsigned int const& source) {
- if (source <= 0x00FFFFFF) {
- // Top pixel is fully transparent.
- //
- } else if (source >= 0xFF000000 || target <= 0x00FFFFFF) {
- // Top pixel is fully opaque or bottom pixel is fully transparent.
- target = source;
- } else {
- // Both pixels have transparency.
- // From http://trac.mapnik.org/browser/trunk/include/mapnik/graphics.hpp#L337
- long a1 = (source >> 24) & 0xff;
- long r1 = source & 0xff;
- long g1 = (source >> 8) & 0xff;
- long b1 = (source >> 16) & 0xff;
-
- long a0 = (target >> 24) & 0xff;
- long r0 = (target & 0xff) * a0;
- long g0 = ((target >> 8) & 0xff) * a0;
- long b0 = ((target >> 16) & 0xff) * a0;
-
- a0 = ((a1 + a0) << 8) - a0 * a1;
- r0 = ((((r1 << 8) - r0) * a1 + (r0 << 8)) / a0);
- g0 = ((((g1 << 8) - g0) * a1 + (g0 << 8)) / a0);
- b0 = ((((b1 << 8) - b0) * a1 + (b0 << 8)) / a0);
- a0 = a0 >> 8;
- target = (a0 << 24) | (b0 << 16) | (g0 << 8) | (r0);
- }
-}
-
-static inline void TintPixel(unsigned & r,
- unsigned & g,
- unsigned & b,
- Tinter const& tint) {
- double h;
- double s;
- double l;
- rgb_to_hsl(r,g,b,h,s,l);
- double h2 = tint.h0 + (h * (tint.h1 - tint.h0));
- double s2 = tint.s0 + (s * (tint.s1 - tint.s0));
- double l2 = tint.l0 + (l * (tint.l1 - tint.l0));
- if (h2 > 1) h2 = 1;
- if (h2 < 0) h2 = 0;
- if (s2 > 1) s2 = 1;
- if (s2 < 0) s2 = 0;
- if (l2 > 1) l2 = 1;
- if (l2 < 0) l2 = 0;
- hsl_to_rgb(h2,s2,l2,r,g,b);
-}
-
-
-static void Blend_Composite(unsigned int *target, BlendBaton *baton, BImage *image) {
- const unsigned int *source = image->im_ptr->data();
-
- int sourceX = std::max(0, -image->x);
- int sourceY = std::max(0, -image->y);
- int sourcePos = sourceY * image->width + sourceX;
-
- int width = image->width - sourceX - std::max(0, image->x + image->width - baton->width);
- int height = image->height - sourceY - std::max(0, image->y + image->height - baton->height);
-
- int targetX = std::max(0, image->x);
- int targetY = std::max(0, image->y);
- int targetPos = targetY * baton->width + targetX;
- bool tinting = !image->tint.is_identity();
- bool set_alpha = !image->tint.is_alpha_identity();
- if (tinting || set_alpha) {
- for (int y = 0; y < height; y++) {
- for (int x = 0; x < width; x++) {
- unsigned int const& source_pixel = source[sourcePos + x];
- unsigned a = (source_pixel >> 24) & 0xff;
- if (set_alpha) {
- double a2 = image->tint.a0 + (a/255.0 * (image->tint.a1 - image->tint.a0));
- if (a2 < 0) a2 = 0;
- a = static_cast(std::floor((a2 * 255.0)+.5));
- if (a > 255) a = 255;
- }
- unsigned r = source_pixel & 0xff;
- unsigned g = (source_pixel >> 8 ) & 0xff;
- unsigned b = (source_pixel >> 16) & 0xff;
- if (a > 1 && tinting) {
- TintPixel(r,g,b,image->tint);
- }
- unsigned int new_pixel = (a << 24) | (b << 16) | (g << 8) | (r);
- Blend_CompositePixel(target[targetPos + x], new_pixel);
- }
- sourcePos += image->width;
- targetPos += baton->width;
- }
- } else {
- for (int y = 0; y < height; y++) {
- for (int x = 0; x < width; x++) {
- Blend_CompositePixel(target[targetPos + x], source[sourcePos + x]);
- }
- sourcePos += image->width;
- targetPos += baton->width;
- }
- }
-}
-
-static void Blend_Encode(mapnik::image_rgba8 const& image, BlendBaton* baton, bool alpha) {
- try {
- if (baton->format == BLEND_FORMAT_JPEG) {
-#if defined(HAVE_JPEG)
- if (baton->quality == 0) baton->quality = 85;
- mapnik::save_as_jpeg(baton->stream, baton->quality, image);
-#else
- baton->message = "Mapnik not built with jpeg support";
-#endif
- } else if (baton->format == BLEND_FORMAT_WEBP) {
-#if defined(HAVE_WEBP)
- if (baton->quality == 0) baton->quality = 80;
- WebPConfig config;
- // Default values set here will be lossless=0 and quality=75 (as least as of webp v0.3.1)
- if (!WebPConfigInit(&config)) {
- /* LCOV_EXCL_START */
- baton->message = "WebPConfigInit failed: version mismatch";
- /* LCOV_EXCL_END */
- } else {
- // see for more details: https://github.com/mapnik/mapnik/wiki/Image-IO#webp-output-options
- config.quality = baton->quality;
- if (baton->compression > 0) {
- config.method = baton->compression;
- }
- mapnik::save_as_webp(baton->stream,image,config,alpha);
- }
-#else
- baton->message = "Mapnik not built with webp support";
-#endif
- } else {
- // Save as PNG.
-#if defined(HAVE_PNG)
- mapnik::png_options opts;
- opts.compression = baton->compression;
- if (baton->encoder == BLEND_ENCODER_MINIZ) opts.use_miniz = true;
- if (baton->palette && baton->palette->valid()) {
- mapnik::save_as_png8_pal(baton->stream, image, *baton->palette, opts);
- } else if (baton->quality > 0) {
- opts.colors = baton->quality;
- // Paletted PNG.
- if (alpha && baton->mode == BLEND_MODE_HEXTREE) {
- mapnik::save_as_png8_hex(baton->stream, image, opts);
- } else {
- mapnik::save_as_png8_oct(baton->stream, image, opts);
- }
- } else {
- mapnik::save_as_png(baton->stream, image, opts);
- }
-#else
- baton->message = "Mapnik not built with png support";
-#endif
- }
- } catch (const std::exception& ex) {
- baton->message = ex.what();
- }
-}
-
-void Work_Blend(uv_work_t* req) {
- BlendBaton* baton = static_cast(req->data);
-
- int total = baton->images.size();
- bool alpha = true;
- int size = 0;
-
- // Iterate from the last to first image because we potentially don't have
- // to decode all images if there's an opaque one.
- Images::reverse_iterator rit = baton->images.rbegin();
- Images::reverse_iterator rend = baton->images.rend();
- for (int index = total - 1; rit != rend; rit++, index--) {
- // If an image that is higher than the current is opaque, stop alltogether.
- if (!alpha) break;
-
- BImage *image = &**rit;
- std::unique_ptr image_reader;
- try {
- image_reader = std::unique_ptr(mapnik::get_image_reader(image->data, image->dataLength));
- } catch (std::exception const& ex) {
- baton->message = ex.what();
- return;
- }
-
- if (!image_reader || !image_reader.get()) {
- // Not quite sure anymore how the pointer would not be returned
- // from the reader and can't find a way to make this fail.
- // So removing from coverage
- /* LCOV_EXCL_START */
- baton->message = "Unknown image format";
- return;
- /* LCOV_EXCL_END */
- }
-
- unsigned layer_width = image_reader->width();
- unsigned layer_height = image_reader->height();
- // Error out on invalid images.
- if (layer_width == 0 || layer_height == 0) {
- // No idea how to create a zero height or width image
- // so removing from coverage, because I am fairly certain
- // it is not possible in almost every image format.
- /* LCOV_EXCL_START */
- baton->message = "zero width/height image encountered";
- return;
- /* LCOV_EXCL_END */
- }
-
- int visibleWidth = (int)layer_width + image->x;
- int visibleHeight = (int)layer_height + image->y;
- // The first image that is in the viewport sets the width/height, if not user supplied.
- if (baton->width <= 0) baton->width = std::max(0, visibleWidth);
- if (baton->height <= 0) baton->height = std::max(0, visibleHeight);
-
- // Skip images that are outside of the viewport.
- if (visibleWidth <= 0 || visibleHeight <= 0 || image->x >= baton->width || image->y >= baton->height) {
- // Remove this layer from the list of layers we consider blending.
- continue;
- }
-
- bool layer_has_alpha = image_reader->has_alpha();
-
- // Short-circuit when we're not reencoding.
- if (size == 0 && !layer_has_alpha && !baton->reencode &&
- image->x == 0 && image->y == 0 &&
- (int)layer_width == baton->width && (int)layer_height == baton->height)
- {
- baton->stream.write((char *)image->data, image->dataLength);
- return;
- }
-
- // allocate image for decoded pixels
- std::unique_ptr im_ptr(new mapnik::image_rgba8(layer_width,layer_height));
- // actually decode pixels now
- try {
- image_reader->read(0,0,*im_ptr);
- } catch (std::exception const&) {
- baton->message = "Could not decode image";
- return;
- }
-
- bool coversWidth = image->x <= 0 && visibleWidth >= baton->width;
- bool coversHeight = image->y <= 0 && visibleHeight >= baton->height;
- if (!layer_has_alpha && coversWidth && coversHeight && image->tint.is_alpha_identity()) {
- // Skip decoding more layers.
- alpha = false;
- }
-
- // Convenience aliases.
- image->width = layer_width;
- image->height = layer_height;
- image->im_ptr = std::move(im_ptr);
- size++;
-
- }
-
- // Now blend images.
- int pixels = baton->width * baton->height;
- if (pixels <= 0) {
- std::ostringstream msg;
- msg << "Image dimensions " << baton->width << "x" << baton->height << " are invalid";
- baton->message = msg.str();
- return;
- }
-
- mapnik::image_rgba8 target(baton->width, baton->height);
- // When we don't actually have transparent pixels, we don't need to set the matte.
- if (alpha) {
- target.set(baton->matte);
- }
- for (auto image_ptr : baton->images)
- {
- if (image_ptr && image_ptr->im_ptr.get())
- {
- Blend_Composite(target.data(), baton, &*image_ptr);
- }
- }
- Blend_Encode(target, baton, alpha);
-}
-
-void Work_AfterBlend(uv_work_t* req) {
- NanScope();
- BlendBaton* baton = static_cast(req->data);
-
- if (!baton->message.length()) {
- std::string result = baton->stream.str();
- Local argv[] = {
- NanNull(),
- NanNewBufferHandle((char *)result.data(), result.length()),
- };
- NanMakeCallback(NanGetCurrentContext()->Global(), NanNew(baton->callback), 2, argv);
- } else {
- Local argv[] = {
- NanError(baton->message.c_str())
- };
- NanMakeCallback(NanGetCurrentContext()->Global(), NanNew(baton->callback), 1, argv);
- }
- delete baton;
-}
-
-NAN_METHOD(Blend) {
- NanScope();
- std::unique_ptr baton(new BlendBaton());
-
- Local options;
- if (args.Length() == 0 || !args[0]->IsArray()) {
- NanThrowTypeError("First argument must be an array of Buffers.");
- NanReturnUndefined();
- } else if (args.Length() == 1) {
- NanThrowTypeError("Second argument must be a function");
- NanReturnUndefined();
- } else if (args.Length() == 2) {
- // No options provided.
- if (!args[1]->IsFunction()) {
- NanThrowTypeError("Second argument must be a function.");
- NanReturnUndefined();
- }
- NanAssignPersistent(baton->callback,args[1].As());
- } else if (args.Length() >= 3) {
- if (!args[1]->IsObject()) {
- NanThrowTypeError("Second argument must be a an options object.");
- NanReturnUndefined();
- }
- options = Local::Cast(args[1]);
-
- if (!args[2]->IsFunction()) {
- NanThrowTypeError("Third argument must be a function.");
- NanReturnUndefined();
- }
- NanAssignPersistent(baton->callback,args[2].As());
- }
-
- // Validate options
- if (!options.IsEmpty()) {
- baton->quality = options->Get(NanNew("quality"))->Int32Value();
-
- Local format_val = options->Get(NanNew("format"));
- if (!format_val.IsEmpty() && format_val->IsString()) {
- if (strcmp(*String::Utf8Value(format_val), "jpeg") == 0 ||
- strcmp(*String::Utf8Value(format_val), "jpg") == 0) {
- baton->format = BLEND_FORMAT_JPEG;
- if (baton->quality == 0) baton->quality = 85; // 85 is same default as mapnik core jpeg
- else if (baton->quality < 0 || baton->quality > 100) {
- NanThrowTypeError("JPEG quality is range 0-100.");
- NanReturnUndefined();
- }
- } else if (strcmp(*String::Utf8Value(format_val), "png") == 0) {
- if (baton->quality == 1 || baton->quality > 256) {
- NanThrowTypeError("PNG images must be quantized between 2 and 256 colors.");
- NanReturnUndefined();
- }
- } else if (strcmp(*String::Utf8Value(format_val), "webp") == 0) {
- baton->format = BLEND_FORMAT_WEBP;
- if (baton->quality == 0) baton->quality = 80;
- else if (baton->quality < 0 || baton->quality > 100) {
- NanThrowTypeError("WebP quality is range 0-100.");
- NanReturnUndefined();
- }
- } else {
- NanThrowTypeError("Invalid output format.");
- NanReturnUndefined();
- }
- }
-
- baton->reencode = options->Get(NanNew("reencode"))->BooleanValue();
- baton->width = options->Get(NanNew("width"))->Int32Value();
- baton->height = options->Get(NanNew("height"))->Int32Value();
-
- Local matte_val = options->Get(NanNew("matte"));
- if (!matte_val.IsEmpty() && matte_val->IsString()) {
- if (!hexToUInt32Color(*String::Utf8Value(matte_val->ToString()), baton->matte))
- {
- NanThrowTypeError("Invalid batte provided.");
- NanReturnUndefined();
- }
-
- // Make sure we're reencoding in the case of single alpha PNGs
- if (baton->matte && !baton->reencode) {
- baton->reencode = true;
- }
- }
-
- Local palette_val = options->Get(NanNew("palette"));
- if (!palette_val.IsEmpty() && palette_val->IsObject()) {
- baton->palette = node::ObjectWrap::Unwrap(palette_val->ToObject())->palette();
- }
-
- Local mode_val = options->Get(NanNew("mode"));
- if (!mode_val.IsEmpty() && mode_val->IsString()) {
- if (strcmp(*String::Utf8Value(mode_val), "octree") == 0 ||
- strcmp(*String::Utf8Value(mode_val), "o") == 0) {
- baton->mode = BLEND_MODE_OCTREE;
- }
- else if (strcmp(*String::Utf8Value(mode_val), "hextree") == 0 ||
- strcmp(*String::Utf8Value(mode_val), "h") == 0) {
- baton->mode = BLEND_MODE_HEXTREE;
- }
- }
-
- Local encoder_val = options->Get(NanNew("encoder"));
- if (!encoder_val.IsEmpty() && encoder_val->IsString()) {
- if (strcmp(*String::Utf8Value(encoder_val), "miniz") == 0) {
- baton->encoder = BLEND_ENCODER_MINIZ;
- }
- // default is libpng
- }
-
- if (options->Has(NanNew("compression"))) {
- Local compression_val = options->Get(NanNew("compression"));
- if (!compression_val.IsEmpty() && compression_val->IsNumber())
- {
- baton->compression = compression_val->Int32Value();
- }
- else
- {
- NanThrowTypeError("Compression option must be a number");
- NanReturnUndefined();
- }
- }
-
- int min_compression = Z_NO_COMPRESSION;
- int max_compression = Z_BEST_COMPRESSION;
- if (baton->format == BLEND_FORMAT_PNG) {
- if (baton->compression < 0) baton->compression = Z_DEFAULT_COMPRESSION;
- if (baton->encoder == BLEND_ENCODER_MINIZ) max_compression = 10; // MZ_UBER_COMPRESSION
- } else if (baton->format == BLEND_FORMAT_WEBP) {
- min_compression = 0, max_compression = 6;
- if (baton->compression < 0) baton->compression = -1;
- }
-
- if (baton->compression > max_compression) {
- std::ostringstream msg;
- msg << "Compression level must be between "
- << min_compression << " and " << max_compression;
- NanThrowTypeError(msg.str().c_str());
- NanReturnUndefined();
- }
- }
-
- Local js_images = Local::Cast(args[0]);
- uint32_t length = js_images->Length();
- if (length < 1 && !baton->reencode) {
- NanThrowTypeError("First argument must contain at least one Buffer.");
- NanReturnUndefined();
- } else if (length == 1 && !baton->reencode) {
- Local buffer = js_images->Get(0);
- if (Buffer::HasInstance(buffer)) {
- // Directly pass through buffer if it's the only one.
- Local argv[] = {
- NanNull(),
- buffer
- };
- NanMakeCallback(NanGetCurrentContext()->Global(), NanNew(baton->callback), 2, argv);
- NanReturnUndefined();
- } else {
- // Check whether the argument is a complex image with offsets etc.
- // In that case, we don't throw but continue going through the blend
- // process below.
- bool valid = false;
- if (buffer->IsObject()) {
- Local props = buffer->ToObject();
- valid = props->Has(NanNew("buffer")) &&
- Buffer::HasInstance(props->Get(NanNew("buffer")));
- }
- if (!valid) {
- NanThrowTypeError("All elements must be Buffers or objects with a 'buffer' property.");
- NanReturnUndefined();
- }
- }
- }
-
- if (!(length >= 1 || (baton->width > 0 && baton->height > 0))) {
- NanThrowTypeError("Without buffers, you have to specify width and height.");
- NanReturnUndefined();
- }
-
- if (baton->width < 0 || baton->height < 0) {
- NanThrowTypeError("Image dimensions must be greater than 0.");
- NanReturnUndefined();
- }
-
- for (uint32_t i = 0; i < length; i++) {
- ImagePtr image = std::make_shared();
- Local buffer = js_images->Get(i);
- if (Buffer::HasInstance(buffer)) {
- NanAssignPersistent(image->buffer,buffer.As());
- } else if (buffer->IsObject()) {
- Local props = buffer->ToObject();
- if (props->Has(NanNew("buffer"))) {
- buffer = props->Get(NanNew("buffer"));
- if (Buffer::HasInstance(buffer)) {
- NanAssignPersistent(image->buffer,buffer.As());
- }
- }
- image->x = props->Get(NanNew("x"))->Int32Value();
- image->y = props->Get(NanNew("y"))->Int32Value();
-
- Local tint_val = props->Get(NanNew("tint"));
- if (!tint_val.IsEmpty() && tint_val->IsObject()) {
- Local tint = tint_val->ToObject();
- if (!tint.IsEmpty()) {
- baton->reencode = true;
- std::string msg;
- parseTintOps(tint,image->tint,msg);
- if (!msg.empty()) {
- NanThrowTypeError(msg.c_str());
- NanReturnUndefined();
- }
- }
- }
- }
-
- if (image->buffer.IsEmpty()) {
- NanThrowTypeError("All elements must be Buffers or objects with a 'buffer' property.");
- NanReturnUndefined();
- }
-
- image->data = node::Buffer::Data(buffer);
- image->dataLength = node::Buffer::Length(buffer);
- baton->images.push_back(image);
- }
-
- uv_queue_work(uv_default_loop(), &(baton.release())->request, Work_Blend, (uv_after_work_cb)Work_AfterBlend);
-
- NanReturnUndefined();
-}
-
-}
diff --git a/test/fixture/rename.input.js b/test/fixture/rename.input.js
deleted file mode 100644
index 16599b811..000000000
--- a/test/fixture/rename.input.js
+++ /dev/null
@@ -1,6 +0,0 @@
-/**
- * Cheesoid!
- * @name cheese
- */
-function petrol(): string {
-}
diff --git a/test/fixture/rename.output.custom.md b/test/fixture/rename.output.custom.md
deleted file mode 100644
index 720d32cfd..000000000
--- a/test/fixture/rename.output.custom.md
+++ /dev/null
@@ -1,3 +0,0 @@
-# cheese
-
-Cheesoid!
diff --git a/test/fixture/rename.output.json b/test/fixture/rename.output.json
deleted file mode 100644
index bb63acada..000000000
--- a/test/fixture/rename.output.json
+++ /dev/null
@@ -1,45 +0,0 @@
-[
- {
- "description": "Cheesoid!",
- "tags": [
- {
- "title": "name",
- "description": null,
- "lineNumber": 2,
- "name": "cheese"
- }
- ],
- "loc": {
- "start": {
- "line": 1,
- "column": 0
- },
- "end": {
- "line": 4,
- "column": 3
- }
- },
- "context": {
- "loc": {
- "start": {
- "line": 5,
- "column": 0
- },
- "end": {
- "line": 6,
- "column": 1
- }
- },
- "code": "/**\n * Cheesoid!\n * @name cheese\n */\nfunction petrol(): string {\n}\n"
- },
- "errors": [],
- "name": "cheese",
- "members": {
- "instance": [],
- "static": []
- },
- "path": [
- "cheese"
- ]
- }
-]
\ No newline at end of file
diff --git a/test/fixture/rename.output.md b/test/fixture/rename.output.md
deleted file mode 100644
index 720d32cfd..000000000
--- a/test/fixture/rename.output.md
+++ /dev/null
@@ -1,3 +0,0 @@
-# cheese
-
-Cheesoid!
diff --git a/test/fixture/rename.output.md.json b/test/fixture/rename.output.md.json
deleted file mode 100644
index f5debf3f8..000000000
--- a/test/fixture/rename.output.md.json
+++ /dev/null
@@ -1,46 +0,0 @@
-{
- "type": "root",
- "children": [
- {
- "depth": 1,
- "type": "heading",
- "children": [
- {
- "type": "text",
- "value": "cheese"
- }
- ]
- },
- {
- "type": "paragraph",
- "children": [
- {
- "type": "text",
- "value": "Cheesoid!",
- "position": {
- "start": {
- "line": 1,
- "column": 1
- },
- "end": {
- "line": 1,
- "column": 10
- },
- "indent": []
- }
- }
- ],
- "position": {
- "start": {
- "line": 1,
- "column": 1
- },
- "end": {
- "line": 1,
- "column": 10
- },
- "indent": []
- }
- }
- ]
-}
\ No newline at end of file
diff --git a/test/fixture/require-json.json b/test/fixture/require-json.json
deleted file mode 100644
index 0967ef424..000000000
--- a/test/fixture/require-json.json
+++ /dev/null
@@ -1 +0,0 @@
-{}
diff --git a/test/fixture/require-json.output.custom.md b/test/fixture/require-json.output.custom.md
deleted file mode 100644
index 8b1378917..000000000
--- a/test/fixture/require-json.output.custom.md
+++ /dev/null
@@ -1 +0,0 @@
-
diff --git a/test/fixture/require-json.output.json b/test/fixture/require-json.output.json
deleted file mode 100644
index 0637a088a..000000000
--- a/test/fixture/require-json.output.json
+++ /dev/null
@@ -1 +0,0 @@
-[]
\ No newline at end of file
diff --git a/test/fixture/require-json.output.md b/test/fixture/require-json.output.md
deleted file mode 100644
index 8b1378917..000000000
--- a/test/fixture/require-json.output.md
+++ /dev/null
@@ -1 +0,0 @@
-
diff --git a/test/fixture/require-json.output.md.json b/test/fixture/require-json.output.md.json
deleted file mode 100644
index 2b1e4c832..000000000
--- a/test/fixture/require-json.output.md.json
+++ /dev/null
@@ -1,4 +0,0 @@
-{
- "type": "root",
- "children": []
-}
\ No newline at end of file
diff --git a/test/fixture/simple-hashbang.output.custom.md b/test/fixture/simple-hashbang.output.custom.md
deleted file mode 100644
index 39eb99a53..000000000
--- a/test/fixture/simple-hashbang.output.custom.md
+++ /dev/null
@@ -1,5 +0,0 @@
-# simple-hashbang.input
-
-This function returns the number one.
-
-Returns **Number** numberone
diff --git a/test/fixture/simple-hashbang.output.json b/test/fixture/simple-hashbang.output.json
deleted file mode 100644
index 5e997d0af..000000000
--- a/test/fixture/simple-hashbang.output.json
+++ /dev/null
@@ -1,60 +0,0 @@
-[
- {
- "description": "This function returns the number one.",
- "tags": [
- {
- "title": "returns",
- "description": "numberone",
- "lineNumber": 2,
- "type": {
- "type": "NameExpression",
- "name": "Number"
- }
- }
- ],
- "loc": {
- "start": {
- "line": 3,
- "column": 0
- },
- "end": {
- "line": 6,
- "column": 3
- }
- },
- "context": {
- "loc": {
- "start": {
- "line": 7,
- "column": 0
- },
- "end": {
- "line": 10,
- "column": 2
- }
- },
- "code": "#!/usr/bin/env node\n\n/**\n * This function returns the number one.\n * @returns {Number} numberone\n */\nmodule.exports = function () {\n // this returns 1\n return 1;\n};\n"
- },
- "errors": [],
- "returns": [
- {
- "title": "returns",
- "description": "numberone",
- "lineNumber": 2,
- "type": {
- "type": "NameExpression",
- "name": "Number"
- }
- }
- ],
- "name": "simple-hashbang.input",
- "kind": "function",
- "members": {
- "instance": [],
- "static": []
- },
- "path": [
- "simple-hashbang.input"
- ]
- }
-]
\ No newline at end of file
diff --git a/test/fixture/simple-hashbang.output.md b/test/fixture/simple-hashbang.output.md
deleted file mode 100644
index 39eb99a53..000000000
--- a/test/fixture/simple-hashbang.output.md
+++ /dev/null
@@ -1,5 +0,0 @@
-# simple-hashbang.input
-
-This function returns the number one.
-
-Returns **Number** numberone
diff --git a/test/fixture/simple-hashbang.output.md.json b/test/fixture/simple-hashbang.output.md.json
deleted file mode 100644
index 724f1db01..000000000
--- a/test/fixture/simple-hashbang.output.md.json
+++ /dev/null
@@ -1,99 +0,0 @@
-{
- "type": "root",
- "children": [
- {
- "depth": 1,
- "type": "heading",
- "children": [
- {
- "type": "text",
- "value": "simple-hashbang.input"
- }
- ]
- },
- {
- "type": "paragraph",
- "children": [
- {
- "type": "text",
- "value": "This function returns the number one.",
- "position": {
- "start": {
- "line": 1,
- "column": 1
- },
- "end": {
- "line": 1,
- "column": 38
- },
- "indent": []
- }
- }
- ],
- "position": {
- "start": {
- "line": 1,
- "column": 1
- },
- "end": {
- "line": 1,
- "column": 38
- },
- "indent": []
- }
- },
- {
- "type": "paragraph",
- "children": [
- {
- "type": "text",
- "value": "Returns "
- },
- {
- "type": "strong",
- "children": [
- {
- "type": "text",
- "value": "Number"
- }
- ]
- },
- {
- "type": "text",
- "value": " "
- },
- {
- "type": "paragraph",
- "children": [
- {
- "type": "text",
- "value": "numberone",
- "position": {
- "start": {
- "line": 1,
- "column": 1
- },
- "end": {
- "line": 1,
- "column": 10
- },
- "indent": []
- }
- }
- ],
- "position": {
- "start": {
- "line": 1,
- "column": 1
- },
- "end": {
- "line": 1,
- "column": 10
- },
- "indent": []
- }
- }
- ]
- }
- ]
-}
\ No newline at end of file
diff --git a/test/fixture/simple-private.output.custom.md b/test/fixture/simple-private.output.custom.md
deleted file mode 100644
index 8b1378917..000000000
--- a/test/fixture/simple-private.output.custom.md
+++ /dev/null
@@ -1 +0,0 @@
-
diff --git a/test/fixture/simple-private.output.json b/test/fixture/simple-private.output.json
deleted file mode 100644
index 0637a088a..000000000
--- a/test/fixture/simple-private.output.json
+++ /dev/null
@@ -1 +0,0 @@
-[]
\ No newline at end of file
diff --git a/test/fixture/simple-private.output.md b/test/fixture/simple-private.output.md
deleted file mode 100644
index 8b1378917..000000000
--- a/test/fixture/simple-private.output.md
+++ /dev/null
@@ -1 +0,0 @@
-
diff --git a/test/fixture/simple-private.output.md.json b/test/fixture/simple-private.output.md.json
deleted file mode 100644
index 2b1e4c832..000000000
--- a/test/fixture/simple-private.output.md.json
+++ /dev/null
@@ -1,4 +0,0 @@
-{
- "type": "root",
- "children": []
-}
\ No newline at end of file
diff --git a/test/fixture/simple-singlestar.output.custom.md b/test/fixture/simple-singlestar.output.custom.md
deleted file mode 100644
index 8b1378917..000000000
--- a/test/fixture/simple-singlestar.output.custom.md
+++ /dev/null
@@ -1 +0,0 @@
-
diff --git a/test/fixture/simple-singlestar.output.json b/test/fixture/simple-singlestar.output.json
deleted file mode 100644
index 0637a088a..000000000
--- a/test/fixture/simple-singlestar.output.json
+++ /dev/null
@@ -1 +0,0 @@
-[]
\ No newline at end of file
diff --git a/test/fixture/simple-singlestar.output.md b/test/fixture/simple-singlestar.output.md
deleted file mode 100644
index 8b1378917..000000000
--- a/test/fixture/simple-singlestar.output.md
+++ /dev/null
@@ -1 +0,0 @@
-
diff --git a/test/fixture/simple-singlestar.output.md.json b/test/fixture/simple-singlestar.output.md.json
deleted file mode 100644
index 2b1e4c832..000000000
--- a/test/fixture/simple-singlestar.output.md.json
+++ /dev/null
@@ -1,4 +0,0 @@
-{
- "type": "root",
- "children": []
-}
\ No newline at end of file
diff --git a/test/fixture/simple-triplestar.output.custom.md b/test/fixture/simple-triplestar.output.custom.md
deleted file mode 100644
index 8b1378917..000000000
--- a/test/fixture/simple-triplestar.output.custom.md
+++ /dev/null
@@ -1 +0,0 @@
-
diff --git a/test/fixture/simple-triplestar.output.json b/test/fixture/simple-triplestar.output.json
deleted file mode 100644
index 0637a088a..000000000
--- a/test/fixture/simple-triplestar.output.json
+++ /dev/null
@@ -1 +0,0 @@
-[]
\ No newline at end of file
diff --git a/test/fixture/simple-triplestar.output.md b/test/fixture/simple-triplestar.output.md
deleted file mode 100644
index 8b1378917..000000000
--- a/test/fixture/simple-triplestar.output.md
+++ /dev/null
@@ -1 +0,0 @@
-
diff --git a/test/fixture/simple-triplestar.output.md.json b/test/fixture/simple-triplestar.output.md.json
deleted file mode 100644
index 2b1e4c832..000000000
--- a/test/fixture/simple-triplestar.output.md.json
+++ /dev/null
@@ -1,4 +0,0 @@
-{
- "type": "root",
- "children": []
-}
\ No newline at end of file
diff --git a/test/fixture/simple-two.output.custom.md b/test/fixture/simple-two.output.custom.md
deleted file mode 100644
index ca853da4c..000000000
--- a/test/fixture/simple-two.output.custom.md
+++ /dev/null
@@ -1,16 +0,0 @@
-# returnTwo
-
-This function returns the number plus two.
-
-**Parameters**
-
-- `a` **Number** the number
-
-**Examples**
-
-```javascript
-var result = returnTwo(4);
-// result is 6
-```
-
-Returns **Number** numbertwo
diff --git a/test/fixture/simple-two.output.json b/test/fixture/simple-two.output.json
deleted file mode 100644
index 220a3c41d..000000000
--- a/test/fixture/simple-two.output.json
+++ /dev/null
@@ -1,90 +0,0 @@
-[
- {
- "description": "This function returns the number plus two.",
- "tags": [
- {
- "title": "param",
- "description": "the number",
- "lineNumber": 3,
- "type": {
- "type": "NameExpression",
- "name": "Number"
- },
- "name": "a"
- },
- {
- "title": "returns",
- "description": "numbertwo",
- "lineNumber": 4,
- "type": {
- "type": "NameExpression",
- "name": "Number"
- }
- },
- {
- "title": "example",
- "description": "var result = returnTwo(4);\n// result is 6",
- "lineNumber": 5
- }
- ],
- "loc": {
- "start": {
- "line": 1,
- "column": 0
- },
- "end": {
- "line": 9,
- "column": 3
- }
- },
- "context": {
- "loc": {
- "start": {
- "line": 10,
- "column": 0
- },
- "end": {
- "line": 13,
- "column": 1
- }
- },
- "code": "/**\n * This function returns the number plus two.\n *\n * @param {Number} a the number\n * @returns {Number} numbertwo\n * @example\n * var result = returnTwo(4);\n * // result is 6\n */\nfunction returnTwo(a) {\n // this returns a + 2\n return a + 2;\n}\n"
- },
- "errors": [],
- "params": [
- {
- "title": "param",
- "description": "the number",
- "lineNumber": 3,
- "type": {
- "type": "NameExpression",
- "name": "Number"
- },
- "name": "a"
- }
- ],
- "returns": [
- {
- "title": "returns",
- "description": "numbertwo",
- "lineNumber": 4,
- "type": {
- "type": "NameExpression",
- "name": "Number"
- }
- }
- ],
- "examples": [
- "var result = returnTwo(4);\n// result is 6"
- ],
- "name": "returnTwo",
- "kind": "function",
- "members": {
- "instance": [],
- "static": []
- },
- "path": [
- "returnTwo"
- ]
- }
-]
\ No newline at end of file
diff --git a/test/fixture/simple-two.output.md b/test/fixture/simple-two.output.md
deleted file mode 100644
index ca853da4c..000000000
--- a/test/fixture/simple-two.output.md
+++ /dev/null
@@ -1,16 +0,0 @@
-# returnTwo
-
-This function returns the number plus two.
-
-**Parameters**
-
-- `a` **Number** the number
-
-**Examples**
-
-```javascript
-var result = returnTwo(4);
-// result is 6
-```
-
-Returns **Number** numbertwo
diff --git a/test/fixture/simple-two.output.md.json b/test/fixture/simple-two.output.md.json
deleted file mode 100644
index 78a24e28f..000000000
--- a/test/fixture/simple-two.output.md.json
+++ /dev/null
@@ -1,190 +0,0 @@
-{
- "type": "root",
- "children": [
- {
- "depth": 1,
- "type": "heading",
- "children": [
- {
- "type": "text",
- "value": "returnTwo"
- }
- ]
- },
- {
- "type": "paragraph",
- "children": [
- {
- "type": "text",
- "value": "This function returns the number plus two.",
- "position": {
- "start": {
- "line": 1,
- "column": 1
- },
- "end": {
- "line": 1,
- "column": 43
- },
- "indent": []
- }
- }
- ],
- "position": {
- "start": {
- "line": 1,
- "column": 1
- },
- "end": {
- "line": 1,
- "column": 43
- },
- "indent": []
- }
- },
- {
- "type": "strong",
- "children": [
- {
- "type": "text",
- "value": "Parameters"
- }
- ]
- },
- {
- "ordered": false,
- "type": "list",
- "children": [
- {
- "type": "listItem",
- "children": [
- {
- "type": "paragraph",
- "children": [
- {
- "type": "inlineCode",
- "value": "a"
- },
- {
- "type": "text",
- "value": " "
- },
- {
- "type": "strong",
- "children": [
- {
- "type": "text",
- "value": "Number"
- }
- ]
- },
- {
- "type": "text",
- "value": " "
- },
- {
- "type": "paragraph",
- "children": [
- {
- "type": "text",
- "value": "the number",
- "position": {
- "start": {
- "line": 1,
- "column": 1
- },
- "end": {
- "line": 1,
- "column": 11
- },
- "indent": []
- }
- }
- ],
- "position": {
- "start": {
- "line": 1,
- "column": 1
- },
- "end": {
- "line": 1,
- "column": 11
- },
- "indent": []
- }
- }
- ]
- }
- ]
- }
- ]
- },
- {
- "type": "strong",
- "children": [
- {
- "type": "text",
- "value": "Examples"
- }
- ]
- },
- {
- "lang": "javascript",
- "type": "code",
- "value": "var result = returnTwo(4);\n// result is 6"
- },
- {
- "type": "paragraph",
- "children": [
- {
- "type": "text",
- "value": "Returns "
- },
- {
- "type": "strong",
- "children": [
- {
- "type": "text",
- "value": "Number"
- }
- ]
- },
- {
- "type": "text",
- "value": " "
- },
- {
- "type": "paragraph",
- "children": [
- {
- "type": "text",
- "value": "numbertwo",
- "position": {
- "start": {
- "line": 1,
- "column": 1
- },
- "end": {
- "line": 1,
- "column": 10
- },
- "indent": []
- }
- }
- ],
- "position": {
- "start": {
- "line": 1,
- "column": 1
- },
- "end": {
- "line": 1,
- "column": 10
- },
- "indent": []
- }
- }
- ]
- }
- ]
-}
\ No newline at end of file
diff --git a/test/fixture/simple.output.custom.md b/test/fixture/simple.output.custom.md
deleted file mode 100644
index 8b1cc0a93..000000000
--- a/test/fixture/simple.output.custom.md
+++ /dev/null
@@ -1,5 +0,0 @@
-# simple.input
-
-This function returns the number one.
-
-Returns **Number** numberone
diff --git a/test/fixture/simple.output.github.json b/test/fixture/simple.output.github.json
deleted file mode 100644
index 46c9fd7ba..000000000
--- a/test/fixture/simple.output.github.json
+++ /dev/null
@@ -1,62 +0,0 @@
-[
- {
- "description": "This function returns the number one.",
- "tags": [
- {
- "title": "returns",
- "description": "numberone",
- "lineNumber": 2,
- "type": {
- "type": "NameExpression",
- "name": "Number"
- }
- }
- ],
- "loc": {
- "start": {
- "line": 1,
- "column": 0
- },
- "end": {
- "line": 4,
- "column": 3
- }
- },
- "context": {
- "loc": {
- "start": {
- "line": 5,
- "column": 0
- },
- "end": {
- "line": 8,
- "column": 2
- }
- },
- "code": "/**\n * This function returns the number one.\n * @returns {Number} numberone\n */\nmodule.exports = function () {\n // this returns 1\n return 1;\n};\n",
- "path": "test/fixture/simple.input.js",
- "github": "[github]"
- },
- "errors": [],
- "returns": [
- {
- "title": "returns",
- "description": "numberone",
- "lineNumber": 2,
- "type": {
- "type": "NameExpression",
- "name": "Number"
- }
- }
- ],
- "name": "simple.input",
- "kind": "function",
- "members": {
- "instance": [],
- "static": []
- },
- "path": [
- "simple.input"
- ]
- }
-]
\ No newline at end of file
diff --git a/test/fixture/simple.output.github.md b/test/fixture/simple.output.github.md
deleted file mode 100644
index 48c4782ec..000000000
--- a/test/fixture/simple.output.github.md
+++ /dev/null
@@ -1,7 +0,0 @@
-# simple.input
-
-[test/fixture/simple.input.js:5-8]([github] "Source code on GitHub")
-
-This function returns the number one.
-
-Returns **Number** numberone
diff --git a/test/fixture/simple.output.json b/test/fixture/simple.output.json
deleted file mode 100644
index 3d9490871..000000000
--- a/test/fixture/simple.output.json
+++ /dev/null
@@ -1,60 +0,0 @@
-[
- {
- "description": "This function returns the number one.",
- "tags": [
- {
- "title": "returns",
- "description": "numberone",
- "lineNumber": 2,
- "type": {
- "type": "NameExpression",
- "name": "Number"
- }
- }
- ],
- "loc": {
- "start": {
- "line": 1,
- "column": 0
- },
- "end": {
- "line": 4,
- "column": 3
- }
- },
- "context": {
- "loc": {
- "start": {
- "line": 5,
- "column": 0
- },
- "end": {
- "line": 8,
- "column": 2
- }
- },
- "code": "/**\n * This function returns the number one.\n * @returns {Number} numberone\n */\nmodule.exports = function () {\n // this returns 1\n return 1;\n};\n"
- },
- "errors": [],
- "returns": [
- {
- "title": "returns",
- "description": "numberone",
- "lineNumber": 2,
- "type": {
- "type": "NameExpression",
- "name": "Number"
- }
- }
- ],
- "name": "simple.input",
- "kind": "function",
- "members": {
- "instance": [],
- "static": []
- },
- "path": [
- "simple.input"
- ]
- }
-]
\ No newline at end of file
diff --git a/test/fixture/simple.output.md b/test/fixture/simple.output.md
deleted file mode 100644
index 8b1cc0a93..000000000
--- a/test/fixture/simple.output.md
+++ /dev/null
@@ -1,5 +0,0 @@
-# simple.input
-
-This function returns the number one.
-
-Returns **Number** numberone
diff --git a/test/fixture/simple.output.md.json b/test/fixture/simple.output.md.json
deleted file mode 100644
index 5caa7ad75..000000000
--- a/test/fixture/simple.output.md.json
+++ /dev/null
@@ -1,99 +0,0 @@
-{
- "type": "root",
- "children": [
- {
- "depth": 1,
- "type": "heading",
- "children": [
- {
- "type": "text",
- "value": "simple.input"
- }
- ]
- },
- {
- "type": "paragraph",
- "children": [
- {
- "type": "text",
- "value": "This function returns the number one.",
- "position": {
- "start": {
- "line": 1,
- "column": 1
- },
- "end": {
- "line": 1,
- "column": 38
- },
- "indent": []
- }
- }
- ],
- "position": {
- "start": {
- "line": 1,
- "column": 1
- },
- "end": {
- "line": 1,
- "column": 38
- },
- "indent": []
- }
- },
- {
- "type": "paragraph",
- "children": [
- {
- "type": "text",
- "value": "Returns "
- },
- {
- "type": "strong",
- "children": [
- {
- "type": "text",
- "value": "Number"
- }
- ]
- },
- {
- "type": "text",
- "value": " "
- },
- {
- "type": "paragraph",
- "children": [
- {
- "type": "text",
- "value": "numberone",
- "position": {
- "start": {
- "line": 1,
- "column": 1
- },
- "end": {
- "line": 1,
- "column": 10
- },
- "indent": []
- }
- }
- ],
- "position": {
- "start": {
- "line": 1,
- "column": 1
- },
- "end": {
- "line": 1,
- "column": 10
- },
- "indent": []
- }
- }
- ]
- }
- ]
-}
\ No newline at end of file
diff --git a/test/fixture/sorting/output.json b/test/fixture/sorting/output.json
deleted file mode 100644
index 920076e99..000000000
--- a/test/fixture/sorting/output.json
+++ /dev/null
@@ -1,113 +0,0 @@
-[
- {
- "description": "Bananas are yellow",
- "tags": [],
- "loc": {
- "start": {
- "line": 8,
- "column": 0
- },
- "end": {
- "line": 10,
- "column": 3
- }
- },
- "context": {
- "loc": {
- "start": {
- "line": 11,
- "column": 0
- },
- "end": {
- "line": 13,
- "column": 2
- }
- },
- "file": "[path]",
- "code": "/**\n * Apples are red\n */\nvar apples = function() {\n return 'red';\n};\n\n/**\n * Bananas are yellow\n */\nvar bananas = function() {\n return 'yellow';\n};\n\n/**\n * Carrots are awesome\n */\nvar carrots = function() {\n return 'awesome';\n};\n"
- },
- "name": "bananas",
- "kind": "function",
- "members": {
- "instance": [],
- "static": []
- },
- "path": [
- "bananas"
- ]
- },
- {
- "description": "Carrots are awesome",
- "tags": [],
- "loc": {
- "start": {
- "line": 15,
- "column": 0
- },
- "end": {
- "line": 17,
- "column": 3
- }
- },
- "context": {
- "loc": {
- "start": {
- "line": 18,
- "column": 0
- },
- "end": {
- "line": 20,
- "column": 2
- }
- },
- "file": "[path]",
- "code": "/**\n * Apples are red\n */\nvar apples = function() {\n return 'red';\n};\n\n/**\n * Bananas are yellow\n */\nvar bananas = function() {\n return 'yellow';\n};\n\n/**\n * Carrots are awesome\n */\nvar carrots = function() {\n return 'awesome';\n};\n"
- },
- "name": "carrots",
- "kind": "function",
- "members": {
- "instance": [],
- "static": []
- },
- "path": [
- "carrots"
- ]
- },
- {
- "description": "Apples are red",
- "tags": [],
- "loc": {
- "start": {
- "line": 1,
- "column": 0
- },
- "end": {
- "line": 3,
- "column": 3
- }
- },
- "context": {
- "loc": {
- "start": {
- "line": 4,
- "column": 0
- },
- "end": {
- "line": 6,
- "column": 2
- }
- },
- "file": "[path]",
- "code": "/**\n * Apples are red\n */\nvar apples = function() {\n return 'red';\n};\n\n/**\n * Bananas are yellow\n */\nvar bananas = function() {\n return 'yellow';\n};\n\n/**\n * Carrots are awesome\n */\nvar carrots = function() {\n return 'awesome';\n};\n"
- },
- "name": "apples",
- "kind": "function",
- "members": {
- "instance": [],
- "static": []
- },
- "path": [
- "apples"
- ]
- }
-]
\ No newline at end of file
diff --git a/test/fixture/throws.input.js b/test/fixture/throws.input.js
deleted file mode 100644
index 690c20783..000000000
--- a/test/fixture/throws.input.js
+++ /dev/null
@@ -1,15 +0,0 @@
-/**
- * This function returns the number plus two.
- *
- * @param {Number} a the number
- * @returns {Number} numbertwo
- * @throws {Error} if number is 3
- * @example
- * var result = returnTwo(4);
- * // result is 6
- */
-function returnTwo(a) {
- if (a === 3) throw new Error('cannot be 3');
- // this returns a + 2
- return a + 2;
-}
diff --git a/test/fixture/throws.output.custom.md b/test/fixture/throws.output.custom.md
deleted file mode 100644
index ca853da4c..000000000
--- a/test/fixture/throws.output.custom.md
+++ /dev/null
@@ -1,16 +0,0 @@
-# returnTwo
-
-This function returns the number plus two.
-
-**Parameters**
-
-- `a` **Number** the number
-
-**Examples**
-
-```javascript
-var result = returnTwo(4);
-// result is 6
-```
-
-Returns **Number** numbertwo
diff --git a/test/fixture/throws.output.json b/test/fixture/throws.output.json
deleted file mode 100644
index 0aee1450f..000000000
--- a/test/fixture/throws.output.json
+++ /dev/null
@@ -1,110 +0,0 @@
-[
- {
- "description": "This function returns the number plus two.",
- "tags": [
- {
- "title": "param",
- "description": "the number",
- "lineNumber": 3,
- "type": {
- "type": "NameExpression",
- "name": "Number"
- },
- "name": "a"
- },
- {
- "title": "returns",
- "description": "numbertwo",
- "lineNumber": 4,
- "type": {
- "type": "NameExpression",
- "name": "Number"
- }
- },
- {
- "title": "throws",
- "description": "if number is 3",
- "lineNumber": 5,
- "type": {
- "type": "NameExpression",
- "name": "Error"
- }
- },
- {
- "title": "example",
- "description": "var result = returnTwo(4);\n// result is 6",
- "lineNumber": 6
- }
- ],
- "loc": {
- "start": {
- "line": 1,
- "column": 0
- },
- "end": {
- "line": 10,
- "column": 3
- }
- },
- "context": {
- "loc": {
- "start": {
- "line": 11,
- "column": 0
- },
- "end": {
- "line": 15,
- "column": 1
- }
- },
- "code": "/**\n * This function returns the number plus two.\n *\n * @param {Number} a the number\n * @returns {Number} numbertwo\n * @throws {Error} if number is 3\n * @example\n * var result = returnTwo(4);\n * // result is 6\n */\nfunction returnTwo(a) {\n if (a === 3) throw new Error('cannot be 3');\n // this returns a + 2\n return a + 2;\n}\n"
- },
- "errors": [],
- "params": [
- {
- "title": "param",
- "description": "the number",
- "lineNumber": 3,
- "type": {
- "type": "NameExpression",
- "name": "Number"
- },
- "name": "a"
- }
- ],
- "returns": [
- {
- "title": "returns",
- "description": "numbertwo",
- "lineNumber": 4,
- "type": {
- "type": "NameExpression",
- "name": "Number"
- }
- }
- ],
- "throws": [
- {
- "title": "throws",
- "description": "if number is 3",
- "lineNumber": 5,
- "type": {
- "type": "NameExpression",
- "name": "Error"
- }
- }
- ],
- "examples": [
- "var result = returnTwo(4);\n// result is 6"
- ],
- "name": "returnTwo",
- "kind": "function",
- "members": {
- "instance": [],
- "static": []
- },
- "path": [
- "returnTwo"
- ]
- }
-]
\ No newline at end of file
diff --git a/test/fixture/throws.output.md b/test/fixture/throws.output.md
deleted file mode 100644
index ca853da4c..000000000
--- a/test/fixture/throws.output.md
+++ /dev/null
@@ -1,16 +0,0 @@
-# returnTwo
-
-This function returns the number plus two.
-
-**Parameters**
-
-- `a` **Number** the number
-
-**Examples**
-
-```javascript
-var result = returnTwo(4);
-// result is 6
-```
-
-Returns **Number** numbertwo
diff --git a/test/fixture/throws.output.md.json b/test/fixture/throws.output.md.json
deleted file mode 100644
index 78a24e28f..000000000
--- a/test/fixture/throws.output.md.json
+++ /dev/null
@@ -1,190 +0,0 @@
-{
- "type": "root",
- "children": [
- {
- "depth": 1,
- "type": "heading",
- "children": [
- {
- "type": "text",
- "value": "returnTwo"
- }
- ]
- },
- {
- "type": "paragraph",
- "children": [
- {
- "type": "text",
- "value": "This function returns the number plus two.",
- "position": {
- "start": {
- "line": 1,
- "column": 1
- },
- "end": {
- "line": 1,
- "column": 43
- },
- "indent": []
- }
- }
- ],
- "position": {
- "start": {
- "line": 1,
- "column": 1
- },
- "end": {
- "line": 1,
- "column": 43
- },
- "indent": []
- }
- },
- {
- "type": "strong",
- "children": [
- {
- "type": "text",
- "value": "Parameters"
- }
- ]
- },
- {
- "ordered": false,
- "type": "list",
- "children": [
- {
- "type": "listItem",
- "children": [
- {
- "type": "paragraph",
- "children": [
- {
- "type": "inlineCode",
- "value": "a"
- },
- {
- "type": "text",
- "value": " "
- },
- {
- "type": "strong",
- "children": [
- {
- "type": "text",
- "value": "Number"
- }
- ]
- },
- {
- "type": "text",
- "value": " "
- },
- {
- "type": "paragraph",
- "children": [
- {
- "type": "text",
- "value": "the number",
- "position": {
- "start": {
- "line": 1,
- "column": 1
- },
- "end": {
- "line": 1,
- "column": 11
- },
- "indent": []
- }
- }
- ],
- "position": {
- "start": {
- "line": 1,
- "column": 1
- },
- "end": {
- "line": 1,
- "column": 11
- },
- "indent": []
- }
- }
- ]
- }
- ]
- }
- ]
- },
- {
- "type": "strong",
- "children": [
- {
- "type": "text",
- "value": "Examples"
- }
- ]
- },
- {
- "lang": "javascript",
- "type": "code",
- "value": "var result = returnTwo(4);\n// result is 6"
- },
- {
- "type": "paragraph",
- "children": [
- {
- "type": "text",
- "value": "Returns "
- },
- {
- "type": "strong",
- "children": [
- {
- "type": "text",
- "value": "Number"
- }
- ]
- },
- {
- "type": "text",
- "value": " "
- },
- {
- "type": "paragraph",
- "children": [
- {
- "type": "text",
- "value": "numbertwo",
- "position": {
- "start": {
- "line": 1,
- "column": 1
- },
- "end": {
- "line": 1,
- "column": 10
- },
- "indent": []
- }
- }
- ],
- "position": {
- "start": {
- "line": 1,
- "column": 1
- },
- "end": {
- "line": 1,
- "column": 10
- },
- "indent": []
- }
- }
- ]
- }
- ]
-}
\ No newline at end of file
diff --git a/test/fixture/trailing-only.input.js b/test/fixture/trailing-only.input.js
deleted file mode 100644
index 1e1a65e4b..000000000
--- a/test/fixture/trailing-only.input.js
+++ /dev/null
@@ -1,7 +0,0 @@
-function fooBaz() {
- return 2;
-}
-/**
- * this is a type
- * @return {number} nothing
- */
diff --git a/test/fixture/trailing-only.output.custom.md b/test/fixture/trailing-only.output.custom.md
deleted file mode 100644
index f93cb0bc7..000000000
--- a/test/fixture/trailing-only.output.custom.md
+++ /dev/null
@@ -1,5 +0,0 @@
-#
-
-this is a type
-
-Returns **number** nothing
diff --git a/test/fixture/trailing-only.output.json b/test/fixture/trailing-only.output.json
deleted file mode 100644
index 8146d12a6..000000000
--- a/test/fixture/trailing-only.output.json
+++ /dev/null
@@ -1,61 +0,0 @@
-[
- {
- "description": "this is a type",
- "tags": [
- {
- "title": "returns",
- "description": "nothing",
- "lineNumber": 2,
- "type": {
- "type": "NameExpression",
- "name": "number"
- }
- }
- ],
- "loc": {
- "start": {
- "line": 4,
- "column": 0
- },
- "end": {
- "line": 7,
- "column": 3
- }
- },
- "context": {
- "loc": {
- "start": {
- "line": 1,
- "column": 0
- },
- "end": {
- "line": 3,
- "column": 1
- }
- }
- },
- "errors": [
- {
- "message": "could not determine @name for hierarchy"
- }
- ],
- "returns": [
- {
- "title": "returns",
- "description": "nothing",
- "lineNumber": 2,
- "type": {
- "type": "NameExpression",
- "name": "number"
- }
- }
- ],
- "members": {
- "instance": [],
- "static": []
- },
- "path": [
- null
- ]
- }
-]
\ No newline at end of file
diff --git a/test/fixture/trailing-only.output.md b/test/fixture/trailing-only.output.md
deleted file mode 100644
index f93cb0bc7..000000000
--- a/test/fixture/trailing-only.output.md
+++ /dev/null
@@ -1,5 +0,0 @@
-#
-
-this is a type
-
-Returns **number** nothing
diff --git a/test/fixture/trailing-only.output.md.json b/test/fixture/trailing-only.output.md.json
deleted file mode 100644
index 674ff3806..000000000
--- a/test/fixture/trailing-only.output.md.json
+++ /dev/null
@@ -1,98 +0,0 @@
-{
- "type": "root",
- "children": [
- {
- "depth": 1,
- "type": "heading",
- "children": [
- {
- "type": "text"
- }
- ]
- },
- {
- "type": "paragraph",
- "children": [
- {
- "type": "text",
- "value": "this is a type",
- "position": {
- "start": {
- "line": 1,
- "column": 1
- },
- "end": {
- "line": 1,
- "column": 15
- },
- "indent": []
- }
- }
- ],
- "position": {
- "start": {
- "line": 1,
- "column": 1
- },
- "end": {
- "line": 1,
- "column": 15
- },
- "indent": []
- }
- },
- {
- "type": "paragraph",
- "children": [
- {
- "type": "text",
- "value": "Returns "
- },
- {
- "type": "strong",
- "children": [
- {
- "type": "text",
- "value": "number"
- }
- ]
- },
- {
- "type": "text",
- "value": " "
- },
- {
- "type": "paragraph",
- "children": [
- {
- "type": "text",
- "value": "nothing",
- "position": {
- "start": {
- "line": 1,
- "column": 1
- },
- "end": {
- "line": 1,
- "column": 8
- },
- "indent": []
- }
- }
- ],
- "position": {
- "start": {
- "line": 1,
- "column": 1
- },
- "end": {
- "line": 1,
- "column": 8
- },
- "indent": []
- }
- }
- ]
- }
- ]
-}
\ No newline at end of file
diff --git a/test/fixture/trailing.input.js b/test/fixture/trailing.input.js
deleted file mode 100644
index 65adb007c..000000000
--- a/test/fixture/trailing.input.js
+++ /dev/null
@@ -1,18 +0,0 @@
-/**
- * ONE
- * @return {number} something
- */
-function fooBar() {
- return 1;
-}
-/**
- * TWO
- * @return {number} something
- */
-function fooBaz() {
- return 2;
-}
-/**
- * this is a type
- * @class Something
- */
diff --git a/test/fixture/trailing.output.custom.md b/test/fixture/trailing.output.custom.md
deleted file mode 100644
index 608bd1771..000000000
--- a/test/fixture/trailing.output.custom.md
+++ /dev/null
@@ -1,15 +0,0 @@
-# fooBar
-
-ONE
-
-Returns **number** something
-
-# fooBaz
-
-TWO
-
-Returns **number** something
-
-# Something
-
-this is a type
diff --git a/test/fixture/trailing.output.json b/test/fixture/trailing.output.json
deleted file mode 100644
index c41bd2d99..000000000
--- a/test/fixture/trailing.output.json
+++ /dev/null
@@ -1,165 +0,0 @@
-[
- {
- "description": "ONE",
- "tags": [
- {
- "title": "returns",
- "description": "something",
- "lineNumber": 2,
- "type": {
- "type": "NameExpression",
- "name": "number"
- }
- }
- ],
- "loc": {
- "start": {
- "line": 1,
- "column": 0
- },
- "end": {
- "line": 4,
- "column": 3
- }
- },
- "context": {
- "loc": {
- "start": {
- "line": 5,
- "column": 0
- },
- "end": {
- "line": 7,
- "column": 1
- }
- },
- "code": "/**\n * ONE\n * @return {number} something\n */\nfunction fooBar() {\n return 1;\n}\n/**\n * TWO\n * @return {number} something\n */\nfunction fooBaz() {\n return 2;\n}\n/**\n * this is a type\n * @class Something\n */\n"
- },
- "errors": [],
- "returns": [
- {
- "title": "returns",
- "description": "something",
- "lineNumber": 2,
- "type": {
- "type": "NameExpression",
- "name": "number"
- }
- }
- ],
- "name": "fooBar",
- "kind": "function",
- "members": {
- "instance": [],
- "static": []
- },
- "path": [
- "fooBar"
- ]
- },
- {
- "description": "TWO",
- "tags": [
- {
- "title": "returns",
- "description": "something",
- "lineNumber": 2,
- "type": {
- "type": "NameExpression",
- "name": "number"
- }
- }
- ],
- "loc": {
- "start": {
- "line": 8,
- "column": 0
- },
- "end": {
- "line": 11,
- "column": 3
- }
- },
- "context": {
- "loc": {
- "start": {
- "line": 12,
- "column": 0
- },
- "end": {
- "line": 14,
- "column": 1
- }
- },
- "code": "/**\n * ONE\n * @return {number} something\n */\nfunction fooBar() {\n return 1;\n}\n/**\n * TWO\n * @return {number} something\n */\nfunction fooBaz() {\n return 2;\n}\n/**\n * this is a type\n * @class Something\n */\n"
- },
- "errors": [],
- "returns": [
- {
- "title": "returns",
- "description": "something",
- "lineNumber": 2,
- "type": {
- "type": "NameExpression",
- "name": "number"
- }
- }
- ],
- "name": "fooBaz",
- "kind": "function",
- "members": {
- "instance": [],
- "static": []
- },
- "path": [
- "fooBaz"
- ]
- },
- {
- "description": "this is a type",
- "tags": [
- {
- "title": "class",
- "description": null,
- "lineNumber": 2,
- "type": null,
- "name": "Something"
- }
- ],
- "loc": {
- "start": {
- "line": 15,
- "column": 0
- },
- "end": {
- "line": 18,
- "column": 3
- }
- },
- "context": {
- "loc": {
- "start": {
- "line": 12,
- "column": 0
- },
- "end": {
- "line": 14,
- "column": 1
- }
- }
- },
- "errors": [],
- "class": {
- "name": "Something"
- },
- "name": "Something",
- "kind": "class",
- "members": {
- "instance": [],
- "static": []
- },
- "path": [
- "Something"
- ]
- }
-]
\ No newline at end of file
diff --git a/test/fixture/trailing.output.md b/test/fixture/trailing.output.md
deleted file mode 100644
index 608bd1771..000000000
--- a/test/fixture/trailing.output.md
+++ /dev/null
@@ -1,15 +0,0 @@
-# fooBar
-
-ONE
-
-Returns **number** something
-
-# fooBaz
-
-TWO
-
-Returns **number** something
-
-# Something
-
-this is a type
diff --git a/test/fixture/trailing.output.md.json b/test/fixture/trailing.output.md.json
deleted file mode 100644
index 2361924e7..000000000
--- a/test/fixture/trailing.output.md.json
+++ /dev/null
@@ -1,234 +0,0 @@
-{
- "type": "root",
- "children": [
- {
- "depth": 1,
- "type": "heading",
- "children": [
- {
- "type": "text",
- "value": "fooBar"
- }
- ]
- },
- {
- "type": "paragraph",
- "children": [
- {
- "type": "text",
- "value": "ONE",
- "position": {
- "start": {
- "line": 1,
- "column": 1
- },
- "end": {
- "line": 1,
- "column": 4
- },
- "indent": []
- }
- }
- ],
- "position": {
- "start": {
- "line": 1,
- "column": 1
- },
- "end": {
- "line": 1,
- "column": 4
- },
- "indent": []
- }
- },
- {
- "type": "paragraph",
- "children": [
- {
- "type": "text",
- "value": "Returns "
- },
- {
- "type": "strong",
- "children": [
- {
- "type": "text",
- "value": "number"
- }
- ]
- },
- {
- "type": "text",
- "value": " "
- },
- {
- "type": "paragraph",
- "children": [
- {
- "type": "text",
- "value": "something",
- "position": {
- "start": {
- "line": 1,
- "column": 1
- },
- "end": {
- "line": 1,
- "column": 10
- },
- "indent": []
- }
- }
- ],
- "position": {
- "start": {
- "line": 1,
- "column": 1
- },
- "end": {
- "line": 1,
- "column": 10
- },
- "indent": []
- }
- }
- ]
- },
- {
- "depth": 1,
- "type": "heading",
- "children": [
- {
- "type": "text",
- "value": "fooBaz"
- }
- ]
- },
- {
- "type": "paragraph",
- "children": [
- {
- "type": "text",
- "value": "TWO",
- "position": {
- "start": {
- "line": 1,
- "column": 1
- },
- "end": {
- "line": 1,
- "column": 4
- },
- "indent": []
- }
- }
- ],
- "position": {
- "start": {
- "line": 1,
- "column": 1
- },
- "end": {
- "line": 1,
- "column": 4
- },
- "indent": []
- }
- },
- {
- "type": "paragraph",
- "children": [
- {
- "type": "text",
- "value": "Returns "
- },
- {
- "type": "strong",
- "children": [
- {
- "type": "text",
- "value": "number"
- }
- ]
- },
- {
- "type": "text",
- "value": " "
- },
- {
- "type": "paragraph",
- "children": [
- {
- "type": "text",
- "value": "something",
- "position": {
- "start": {
- "line": 1,
- "column": 1
- },
- "end": {
- "line": 1,
- "column": 10
- },
- "indent": []
- }
- }
- ],
- "position": {
- "start": {
- "line": 1,
- "column": 1
- },
- "end": {
- "line": 1,
- "column": 10
- },
- "indent": []
- }
- }
- ]
- },
- {
- "depth": 1,
- "type": "heading",
- "children": [
- {
- "type": "text",
- "value": "Something"
- }
- ]
- },
- {
- "type": "paragraph",
- "children": [
- {
- "type": "text",
- "value": "this is a type",
- "position": {
- "start": {
- "line": 1,
- "column": 1
- },
- "end": {
- "line": 1,
- "column": 15
- },
- "indent": []
- }
- }
- ],
- "position": {
- "start": {
- "line": 1,
- "column": 1
- },
- "end": {
- "line": 1,
- "column": 15
- },
- "indent": []
- }
- }
- ]
-}
\ No newline at end of file
diff --git a/test/fixture/type_application.output.custom.md b/test/fixture/type_application.output.custom.md
deleted file mode 100644
index cb35c4151..000000000
--- a/test/fixture/type_application.output.custom.md
+++ /dev/null
@@ -1,7 +0,0 @@
-# Address6
-
-Represents an IPv6 address
-
-**Parameters**
-
-- `address` **Array<string>** An IPv6 address string
diff --git a/test/fixture/type_application.output.json b/test/fixture/type_application.output.json
deleted file mode 100644
index 935cebae0..000000000
--- a/test/fixture/type_application.output.json
+++ /dev/null
@@ -1,89 +0,0 @@
-[
- {
- "description": "Represents an IPv6 address",
- "tags": [
- {
- "title": "class",
- "description": null,
- "lineNumber": 2,
- "type": null,
- "name": "Address6"
- },
- {
- "title": "param",
- "description": "An IPv6 address string",
- "lineNumber": 3,
- "type": {
- "type": "TypeApplication",
- "expression": {
- "type": "NameExpression",
- "name": "Array"
- },
- "applications": [
- {
- "type": "NameExpression",
- "name": "string"
- }
- ]
- },
- "name": "address"
- }
- ],
- "loc": {
- "start": {
- "line": 1,
- "column": 0
- },
- "end": {
- "line": 5,
- "column": 3
- }
- },
- "context": {
- "loc": {
- "start": {
- "line": 1,
- "column": 0
- },
- "end": {
- "line": 6,
- "column": 0
- }
- }
- },
- "errors": [],
- "class": {
- "name": "Address6"
- },
- "params": [
- {
- "title": "param",
- "description": "An IPv6 address string",
- "lineNumber": 3,
- "type": {
- "type": "TypeApplication",
- "expression": {
- "type": "NameExpression",
- "name": "Array"
- },
- "applications": [
- {
- "type": "NameExpression",
- "name": "string"
- }
- ]
- },
- "name": "address"
- }
- ],
- "name": "Address6",
- "kind": "class",
- "members": {
- "instance": [],
- "static": []
- },
- "path": [
- "Address6"
- ]
- }
-]
\ No newline at end of file
diff --git a/test/fixture/type_application.output.md b/test/fixture/type_application.output.md
deleted file mode 100644
index cb35c4151..000000000
--- a/test/fixture/type_application.output.md
+++ /dev/null
@@ -1,7 +0,0 @@
-# Address6
-
-Represents an IPv6 address
-
-**Parameters**
-
-- `address` **Array<string>** An IPv6 address string
diff --git a/test/fixture/type_application.output.md.json b/test/fixture/type_application.output.md.json
deleted file mode 100644
index 7d043b85a..000000000
--- a/test/fixture/type_application.output.md.json
+++ /dev/null
@@ -1,123 +0,0 @@
-{
- "type": "root",
- "children": [
- {
- "depth": 1,
- "type": "heading",
- "children": [
- {
- "type": "text",
- "value": "Address6"
- }
- ]
- },
- {
- "type": "paragraph",
- "children": [
- {
- "type": "text",
- "value": "Represents an IPv6 address",
- "position": {
- "start": {
- "line": 1,
- "column": 1
- },
- "end": {
- "line": 1,
- "column": 27
- },
- "indent": []
- }
- }
- ],
- "position": {
- "start": {
- "line": 1,
- "column": 1
- },
- "end": {
- "line": 1,
- "column": 27
- },
- "indent": []
- }
- },
- {
- "type": "strong",
- "children": [
- {
- "type": "text",
- "value": "Parameters"
- }
- ]
- },
- {
- "ordered": false,
- "type": "list",
- "children": [
- {
- "type": "listItem",
- "children": [
- {
- "type": "paragraph",
- "children": [
- {
- "type": "inlineCode",
- "value": "address"
- },
- {
- "type": "text",
- "value": " "
- },
- {
- "type": "strong",
- "children": [
- {
- "type": "text",
- "value": "Array<string>"
- }
- ]
- },
- {
- "type": "text",
- "value": " "
- },
- {
- "type": "paragraph",
- "children": [
- {
- "type": "text",
- "value": "An IPv6 address string",
- "position": {
- "start": {
- "line": 1,
- "column": 1
- },
- "end": {
- "line": 1,
- "column": 23
- },
- "indent": []
- }
- }
- ],
- "position": {
- "start": {
- "line": 1,
- "column": 1
- },
- "end": {
- "line": 1,
- "column": 23
- },
- "indent": []
- }
- }
- ]
- }
- ]
- }
- ]
- }
- ]
-}
\ No newline at end of file
diff --git a/test/fixture/typedef.input.js b/test/fixture/typedef.input.js
deleted file mode 100644
index 2747c8de7..000000000
--- a/test/fixture/typedef.input.js
+++ /dev/null
@@ -1,8 +0,0 @@
-/**
- * A type definition.
- * @name MyType
- * @typedef {Object} MyType
- * @property {number} prop1 - one property
- * @property {string} prop2 - another property
- */
-
diff --git a/test/fixture/typedef.output.custom.md b/test/fixture/typedef.output.custom.md
deleted file mode 100644
index 34cf299a4..000000000
--- a/test/fixture/typedef.output.custom.md
+++ /dev/null
@@ -1,8 +0,0 @@
-# MyType
-
-A type definition.
-
-**Properties**
-
-- `prop1` **number** one property
-- `prop2` **string** another property
diff --git a/test/fixture/typedef.output.json b/test/fixture/typedef.output.json
deleted file mode 100644
index f415f91fd..000000000
--- a/test/fixture/typedef.output.json
+++ /dev/null
@@ -1,103 +0,0 @@
-[
- {
- "description": "A type definition.",
- "tags": [
- {
- "title": "name",
- "description": null,
- "lineNumber": 2,
- "name": "MyType"
- },
- {
- "title": "typedef",
- "description": null,
- "lineNumber": 3,
- "type": {
- "type": "NameExpression",
- "name": "Object"
- },
- "name": "MyType"
- },
- {
- "title": "property",
- "description": "one property",
- "lineNumber": 4,
- "type": {
- "type": "NameExpression",
- "name": "number"
- },
- "name": "prop1"
- },
- {
- "title": "property",
- "description": "another property",
- "lineNumber": 5,
- "type": {
- "type": "NameExpression",
- "name": "string"
- },
- "name": "prop2"
- }
- ],
- "loc": {
- "start": {
- "line": 1,
- "column": 0
- },
- "end": {
- "line": 7,
- "column": 3
- }
- },
- "context": {
- "loc": {
- "start": {
- "line": 1,
- "column": 0
- },
- "end": {
- "line": 9,
- "column": 0
- }
- }
- },
- "errors": [],
- "name": "MyType",
- "typedef": {
- "name": "MyType",
- "type": {
- "type": "NameExpression",
- "name": "Object"
- }
- },
- "properties": [
- {
- "title": "property",
- "description": "one property",
- "lineNumber": 4,
- "type": {
- "type": "NameExpression",
- "name": "number"
- },
- "name": "prop1"
- },
- {
- "title": "property",
- "description": "another property",
- "lineNumber": 5,
- "type": {
- "type": "NameExpression",
- "name": "string"
- },
- "name": "prop2"
- }
- ],
- "members": {
- "instance": [],
- "static": []
- },
- "path": [
- "MyType"
- ]
- }
-]
\ No newline at end of file
diff --git a/test/fixture/typedef.output.md b/test/fixture/typedef.output.md
deleted file mode 100644
index 34cf299a4..000000000
--- a/test/fixture/typedef.output.md
+++ /dev/null
@@ -1,8 +0,0 @@
-# MyType
-
-A type definition.
-
-**Properties**
-
-- `prop1` **number** one property
-- `prop2` **string** another property
diff --git a/test/fixture/typedef.output.md.json b/test/fixture/typedef.output.md.json
deleted file mode 100644
index 8ce2d3eaa..000000000
--- a/test/fixture/typedef.output.md.json
+++ /dev/null
@@ -1,185 +0,0 @@
-{
- "type": "root",
- "children": [
- {
- "depth": 1,
- "type": "heading",
- "children": [
- {
- "type": "text",
- "value": "MyType"
- }
- ]
- },
- {
- "type": "paragraph",
- "children": [
- {
- "type": "text",
- "value": "A type definition.",
- "position": {
- "start": {
- "line": 1,
- "column": 1
- },
- "end": {
- "line": 1,
- "column": 19
- },
- "indent": []
- }
- }
- ],
- "position": {
- "start": {
- "line": 1,
- "column": 1
- },
- "end": {
- "line": 1,
- "column": 19
- },
- "indent": []
- }
- },
- {
- "type": "strong",
- "children": [
- {
- "type": "text",
- "value": "Properties"
- }
- ]
- },
- {
- "ordered": false,
- "type": "list",
- "children": [
- {
- "type": "listItem",
- "children": [
- {
- "type": "paragraph",
- "children": [
- {
- "type": "inlineCode",
- "value": "prop1"
- },
- {
- "type": "text",
- "value": " "
- },
- {
- "type": "strong",
- "children": [
- {
- "type": "text",
- "value": "number"
- }
- ]
- },
- {
- "type": "text",
- "value": " "
- },
- {
- "type": "paragraph",
- "children": [
- {
- "type": "text",
- "value": "one property",
- "position": {
- "start": {
- "line": 1,
- "column": 1
- },
- "end": {
- "line": 1,
- "column": 13
- },
- "indent": []
- }
- }
- ],
- "position": {
- "start": {
- "line": 1,
- "column": 1
- },
- "end": {
- "line": 1,
- "column": 13
- },
- "indent": []
- }
- }
- ]
- }
- ]
- },
- {
- "type": "listItem",
- "children": [
- {
- "type": "paragraph",
- "children": [
- {
- "type": "inlineCode",
- "value": "prop2"
- },
- {
- "type": "text",
- "value": " "
- },
- {
- "type": "strong",
- "children": [
- {
- "type": "text",
- "value": "string"
- }
- ]
- },
- {
- "type": "text",
- "value": " "
- },
- {
- "type": "paragraph",
- "children": [
- {
- "type": "text",
- "value": "another property",
- "position": {
- "start": {
- "line": 1,
- "column": 1
- },
- "end": {
- "line": 1,
- "column": 17
- },
- "indent": []
- }
- }
- ],
- "position": {
- "start": {
- "line": 1,
- "column": 1
- },
- "end": {
- "line": 1,
- "column": 17
- },
- "indent": []
- }
- }
- ]
- }
- ]
- }
- ]
- }
- ]
-}
\ No newline at end of file
diff --git a/test/fixture/untyped-param.input.js b/test/fixture/untyped-param.input.js
deleted file mode 100644
index a71776e60..000000000
--- a/test/fixture/untyped-param.input.js
+++ /dev/null
@@ -1,7 +0,0 @@
-/**
- * Represents an IPv6 address
- * @param address - An IPv6 address string
- */
-function foo(address) {
- return address;
-}
diff --git a/test/fixture/untyped-param.output.custom.md b/test/fixture/untyped-param.output.custom.md
deleted file mode 100644
index e0a6fa02a..000000000
--- a/test/fixture/untyped-param.output.custom.md
+++ /dev/null
@@ -1,7 +0,0 @@
-# foo
-
-Represents an IPv6 address
-
-**Parameters**
-
-- `address` An IPv6 address string
diff --git a/test/fixture/untyped-param.output.json b/test/fixture/untyped-param.output.json
deleted file mode 100644
index 0080620ef..000000000
--- a/test/fixture/untyped-param.output.json
+++ /dev/null
@@ -1,56 +0,0 @@
-[
- {
- "description": "Represents an IPv6 address",
- "tags": [
- {
- "title": "param",
- "description": "An IPv6 address string",
- "lineNumber": 2,
- "type": null,
- "name": "address"
- }
- ],
- "loc": {
- "start": {
- "line": 1,
- "column": 0
- },
- "end": {
- "line": 4,
- "column": 3
- }
- },
- "context": {
- "loc": {
- "start": {
- "line": 5,
- "column": 0
- },
- "end": {
- "line": 7,
- "column": 1
- }
- },
- "code": "/**\n * Represents an IPv6 address\n * @param address - An IPv6 address string\n */\nfunction foo(address) {\n return address;\n}\n"
- },
- "errors": [],
- "params": [
- {
- "title": "param",
- "description": "An IPv6 address string",
- "lineNumber": 2,
- "type": null,
- "name": "address"
- }
- ],
- "name": "foo",
- "kind": "function",
- "members": {
- "instance": [],
- "static": []
- },
- "path": [
- "foo"
- ]
- }
-]
\ No newline at end of file
diff --git a/test/fixture/untyped-param.output.md b/test/fixture/untyped-param.output.md
deleted file mode 100644
index e0a6fa02a..000000000
--- a/test/fixture/untyped-param.output.md
+++ /dev/null
@@ -1,7 +0,0 @@
-# foo
-
-Represents an IPv6 address
-
-**Parameters**
-
-- `address` An IPv6 address string
diff --git a/test/fixture/untyped-param.output.md.json b/test/fixture/untyped-param.output.md.json
deleted file mode 100644
index 8a701efea..000000000
--- a/test/fixture/untyped-param.output.md.json
+++ /dev/null
@@ -1,114 +0,0 @@
-{
- "type": "root",
- "children": [
- {
- "depth": 1,
- "type": "heading",
- "children": [
- {
- "type": "text",
- "value": "foo"
- }
- ]
- },
- {
- "type": "paragraph",
- "children": [
- {
- "type": "text",
- "value": "Represents an IPv6 address",
- "position": {
- "start": {
- "line": 1,
- "column": 1
- },
- "end": {
- "line": 1,
- "column": 27
- },
- "indent": []
- }
- }
- ],
- "position": {
- "start": {
- "line": 1,
- "column": 1
- },
- "end": {
- "line": 1,
- "column": 27
- },
- "indent": []
- }
- },
- {
- "type": "strong",
- "children": [
- {
- "type": "text",
- "value": "Parameters"
- }
- ]
- },
- {
- "ordered": false,
- "type": "list",
- "children": [
- {
- "type": "listItem",
- "children": [
- {
- "type": "paragraph",
- "children": [
- {
- "type": "inlineCode",
- "value": "address"
- },
- {
- "type": "text",
- "value": " "
- },
- {
- "type": "text",
- "value": " "
- },
- {
- "type": "paragraph",
- "children": [
- {
- "type": "text",
- "value": "An IPv6 address string",
- "position": {
- "start": {
- "line": 1,
- "column": 1
- },
- "end": {
- "line": 1,
- "column": 23
- },
- "indent": []
- }
- }
- ],
- "position": {
- "start": {
- "line": 1,
- "column": 1
- },
- "end": {
- "line": 1,
- "column": 23
- },
- "indent": []
- }
- }
- ]
- }
- ]
- }
- ]
- }
- ]
-}
\ No newline at end of file
diff --git a/test/lib/filter_access.js b/test/lib/filter_access.js
deleted file mode 100644
index dea2be45c..000000000
--- a/test/lib/filter_access.js
+++ /dev/null
@@ -1,59 +0,0 @@
-'use strict';
-
-var test = require('tap').test,
- filterAccess = require('../../lib/filter_access');
-
-test('filterAccess default', function (t) {
- t.deepEqual(filterAccess(null, [{
- access: 'private'
- }]), []);
- t.end();
-});
-
-test('filterAccess public', function (t) {
- t.deepEqual(filterAccess(null, [{
- access: 'public'
- }]), [{
- access: 'public'
- }]);
- t.end();
-});
-
-test('filterAccess override', function (t) {
- t.deepEqual(filterAccess([], [{
- access: 'private'
- }]), [{
- access: 'private'
- }]);
- t.end();
-});
-
-test('filterAccess nesting', function (t) {
- t.deepEqual(filterAccess(null, [{
- access: 'public',
- members: {
- static: [{
- access: 'public'
- }, {
- access: 'private'
- }]
- }
- }, {
- access: 'private',
- members: {
- static: [{
- access: 'public'
- }, {
- access: 'private'
- }]
- }
- }]), [{
- access: 'public',
- members: {
- static: [{
- access: 'public'
- }]
- }
- }]);
- t.end();
-});
diff --git a/test/lib/flatten.js b/test/lib/flatten.js
deleted file mode 100644
index 158dbd4ed..000000000
--- a/test/lib/flatten.js
+++ /dev/null
@@ -1,156 +0,0 @@
-'use strict';
-
-var test = require('tap').test,
- parse = require('../../lib/parsers/javascript');
-
-function evaluate(fn, filename) {
- return parse({
- file: filename || 'test.js',
- source: fn instanceof Function ? '(' + fn.toString() + ')' : fn
- });
-}
-
-test('flatten', function (t) {
- t.equal(evaluate(function () {
- /** @name test */
- })[0].name, 'test', 'name');
-
- t.equal(evaluate(function () {
- /** @memberof test */
- })[0].memberof, 'test', 'memberof');
-
- t.equal(evaluate(function () {
- /** @classdesc test */
- })[0].classdesc, 'test', 'classdesc');
-
- t.equal(evaluate(function () {
- /** @augments Foo */
- })[0].augments[0].name, 'Foo', 'augments');
-
- t.equal(evaluate(function () {
- /** @kind class */
- })[0].kind, 'class', 'kind');
-
- t.equal(evaluate(function () {
- /** @param test */
- })[0].params[0].name, 'test', 'param');
-
- t.equal(evaluate(function () {
- /** @property {number} test */
- })[0].properties[0].name, 'test', 'property');
-
- t.equal(evaluate(function () {
- /** @returns {number} test */
- })[0].returns[0].description, 'test', 'returns');
-
- t.equal(evaluate(function () {
- /** @example test */
- })[0].examples[0], 'test', 'example');
-
- t.equal(evaluate(function () {
- /** @throws {Object} exception */
- })[0].throws[0].description, 'exception', 'throws');
-
- t.equal(evaluate(function () {
- /** @global */
- })[0].scope, 'global', 'global');
-
- t.equal(evaluate(function () {
- /** @static */
- })[0].scope, 'static', 'static');
-
- t.equal(evaluate(function () {
- /** @instance*/
- })[0].scope, 'instance', 'instance');
-
- t.equal(evaluate(function () {
- /** @inner*/
- })[0].scope, 'inner', 'inner');
-
- t.equal(evaluate(function () {
- /** @access public */
- })[0].access, 'public', 'access public');
-
- t.equal(evaluate(function () {
- /** @access protected */
- })[0].access, 'protected', 'access protected');
-
- t.equal(evaluate(function () {
- /** @access private */
- })[0].access, 'private', 'access private');
-
- t.equal(evaluate(function () {
- /** @protected */
- })[0].access, 'protected', 'protected');
-
- t.equal(evaluate(function () {
- /** @private */
- })[0].access, 'private', 'private');
-
- t.equal(evaluate(function () {
- /** @lends lendee */
- })[0].lends, 'lendee', 'lends');
-
- t.equal(evaluate(function () {
- /** @class name */
- })[0].class.name, 'name', 'class');
-
- t.equal(evaluate(function () {
- /** @constant name */
- })[0].constant.name, 'name', 'constant');
-
- t.equal(evaluate(function () {
- /** @event name */
- })[0].event, 'name', 'event');
-
- t.equal(evaluate(function () {
- /** @external name */
- })[0].external, 'name', 'external');
-
- t.equal(evaluate(function () {
- /** @file name */
- })[0].file, 'name', 'file');
-
- t.equal(evaluate(function () {
- /** @function name */
- })[0].function, 'name', 'function');
-
- t.equal(evaluate(function () {
- /** @member name */
- })[0].member.name, 'name', 'member');
-
- t.equal(evaluate(function () {
- /** @mixin name */
- })[0].mixin, 'name', 'mixin');
-
- t.equal(evaluate(function () {
- /** @module name */
- })[0].module.name, 'name', 'module');
-
- t.equal(evaluate(function () {
- /** @namespace name */
- })[0].namespace.name, 'name', 'namespace');
-
- t.equal(evaluate(function () {
- /** @callback name */
- })[0].callback, 'name', 'callback');
-
- t.deepEqual(evaluate(function () {
- /** @module {string} name */
- })[0].module.type, {
- type: 'NameExpression',
- name: 'string'
- }, 'typed name');
-
- t.deepEqual(evaluate(function () {
- /** @typedef {Object} name */
- })[0].typedef, {
- name: 'name',
- type: {
- type: 'NameExpression',
- name: 'Object'
- }
- }, 'namespace');
-
- t.end();
-});
diff --git a/test/lib/flow_doctrine.js b/test/lib/flow_doctrine.js
deleted file mode 100644
index 57fea672f..000000000
--- a/test/lib/flow_doctrine.js
+++ /dev/null
@@ -1,117 +0,0 @@
-'use strict';
-
-var flowDoctrine = require('../../lib/flow_doctrine.js'),
- parse = require('../../lib/parsers/javascript'),
- test = require('tap').test;
-
-function toComment(fn, filename) {
- return parse({
- file: filename,
- source: fn instanceof Function ? '(' + fn.toString() + ')' : fn
- })[0];
-}
-
-/* eslint-disable */
-test('flowDoctrine', function (t) {
-
- t.deepEqual(flowDoctrine(toComment(
- "/** add */function add(a: number) { }"
- ).context.ast.value.params[0].typeAnnotation.typeAnnotation),
- {
- type: 'NameExpression',
- name: 'number'
- }, 'number');
-
- t.deepEqual(flowDoctrine(toComment(
- "/** add */function add(a: string) { }"
- ).context.ast.value.params[0].typeAnnotation.typeAnnotation),
- {
- type: 'NameExpression',
- name: 'string'
- }, 'string');
-
- t.deepEqual(flowDoctrine(toComment(
- "/** add */function add(a: any) { }"
- ).context.ast.value.params[0].typeAnnotation.typeAnnotation),
- {
- type: 'AllLiteral'
- }, 'all');
-
- t.deepEqual(flowDoctrine(toComment(
- "/** add */function add(a: ?number) { }"
- ).context.ast.value.params[0].typeAnnotation.typeAnnotation),
- {
- type: 'OptionalType',
- expression: {
- type: 'NameExpression',
- name: 'number'
- }
- }, 'optional');
-
- t.deepEqual(flowDoctrine(toComment(
- "/** add */function add(a: number | string) { }"
- ).context.ast.value.params[0].typeAnnotation.typeAnnotation),
- {
- type: 'UnionType',
- elements: [
- {
- type: 'NameExpression',
- name: 'number'
- },
- {
- type: 'NameExpression',
- name: 'string'
- }
- ]
- }, 'union');
-
- t.deepEqual(flowDoctrine(toComment(
- "/** add */function add(a: Object) { }"
- ).context.ast.value.params[0].typeAnnotation.typeAnnotation),
- {
- type: 'NameExpression',
- name: 'Object'
- }, 'object');
-
- t.deepEqual(flowDoctrine(toComment(
- "/** add */function add(a: Array) { }"
- ).context.ast.value.params[0].typeAnnotation.typeAnnotation),
- {
- type: 'NameExpression',
- name: 'Array'
- }, 'array');
-
- t.deepEqual(flowDoctrine(toComment(
- "/** add */function add(a: Array) { }"
- ).context.ast.value.params[0].typeAnnotation.typeAnnotation),
- {
- type: 'TypeApplication',
- expression: {
- type: 'NameExpression',
- name: 'Array'
- },
- applications: [{
- type: 'NameExpression',
- name: 'number'
- }]
- }, 'Array');
-
- t.deepEqual(flowDoctrine(toComment(
- "/** add */function add(a: boolean) { }"
- ).context.ast.value.params[0].typeAnnotation.typeAnnotation),
- {
- type: 'NameExpression',
- name: 'boolean'
- }, 'boolean');
-
- t.deepEqual(flowDoctrine(toComment(
- "/** add */function add(a: undefined) { }"
- ).context.ast.value.params[0].typeAnnotation.typeAnnotation),
- {
- type: 'NameExpression',
- name: 'undefined'
- }, 'undefined');
-
- t.end();
-});
-/* eslint-enable */
diff --git a/test/lib/get_template.js b/test/lib/get_template.js
deleted file mode 100644
index da13e62cd..000000000
--- a/test/lib/get_template.js
+++ /dev/null
@@ -1,14 +0,0 @@
-'use strict';
-
-var getTemplate = require('../../lib/get_template.js'),
- Handlebars = require('handlebars'),
- test = require('tap').test;
-
-test('getTemplate', function (t) {
-
- t.throws(function () {
- getTemplate(Handlebars, 'DOES_NOT_EXIST', 'foo');
- }, 'Template file foo missing');
-
- t.end();
-});
diff --git a/test/lib/git/find_git.js b/test/lib/git/find_git.js
deleted file mode 100644
index 79f6d8cf5..000000000
--- a/test/lib/git/find_git.js
+++ /dev/null
@@ -1,21 +0,0 @@
-'use strict';
-
-var test = require('tap').test,
- mock = require('mock-fs'),
- mockRepo = require('./mock_repo'),
- findGit = require('../../../lib/git/find_git');
-
-test('findGit', function (t) {
-
- mock(mockRepo.master);
-
- t.equal(
- findGit(
- '/my/repository/path/index.js'),
- '/my/repository/path/.git', 'finds git path');
-
- mock.restore();
-
- t.end();
-});
-
diff --git a/test/lib/git/mock_repo.js b/test/lib/git/mock_repo.js
deleted file mode 100644
index ccf060ff6..000000000
--- a/test/lib/git/mock_repo.js
+++ /dev/null
@@ -1,37 +0,0 @@
-module.exports = {
- master: {
- '/my': {
- repository: {
- path: {
- '.git': {
- 'HEAD': 'ref: refs/heads/master',
- 'config': '[remote "origin"]\n' +
- 'url = git@github.com:foo/bar.git\n' +
- 'fetch = +refs/heads/*:refs/remotes/origin/*',
- refs: {
- heads: {
- master: 'this_is_the_sha'
- }
- }
- },
- 'index.js': 'module.exports = 42;'
- }
- }
- }
- },
- detached: {
- '/my': {
- repository: {
- path: {
- '.git': {
- 'HEAD': 'e4cb2ffe677571d0503e659e4e64e01f45639c62',
- 'config': '[remote "origin"]\n' +
- 'url = git@github.com:foo/bar.git\n' +
- 'fetch = +refs/heads/*:refs/remotes/origin/*'
- },
- 'index.js': 'module.exports = 42;'
- }
- }
- }
- }
-};
diff --git a/test/lib/git/url_prefix.js b/test/lib/git/url_prefix.js
deleted file mode 100644
index 1dc4abacc..000000000
--- a/test/lib/git/url_prefix.js
+++ /dev/null
@@ -1,33 +0,0 @@
-'use strict';
-
-var test = require('tap').test,
- mock = require('mock-fs'),
- mockRepo = require('./mock_repo'),
- getGithubURLPrefix = require('../../../lib/git/url_prefix');
-
-test('getGithubURLPrefix', function (t) {
-
- mock(mockRepo.master);
-
- t.equal(
- getGithubURLPrefix(
- '/my/repository/path/'),
- 'https://github.com/foo/bar/blob/this_is_the_sha/',
- 'finds git path on master branch');
-
- mock.restore();
-
- mock(mockRepo.detached);
-
- t.equal(
- getGithubURLPrefix(
- '/my/repository/path/'),
- 'https://github.com/foo/bar/blob/e4cb2ffe677571d0503e659e4e64e01f45639c62/',
- 'finds git path with a detached head');
-
- mock.restore();
-
-
-
- t.end();
-});
diff --git a/test/lib/github.js b/test/lib/github.js
deleted file mode 100644
index d3a5673c0..000000000
--- a/test/lib/github.js
+++ /dev/null
@@ -1,41 +0,0 @@
-'use strict';
-
-/* eslint no-unused-vars: 0 */
-
-var test = require('tap').test,
- mock = require('mock-fs'),
- mockRepo = require('./git/mock_repo'),
- parse = require('../../lib/parsers/javascript'),
- github = require('../../lib/github');
-
-function toComment(fn, filename) {
- return parse({
- file: filename,
- source: fn instanceof Function ? '(' + fn.toString() + ')' : fn
- }).map(github);
-}
-
-function evaluate(fn) {
- return toComment(fn, '/my/repository/path/index.js');
-}
-
-test('github', function (t) {
-
- mock(mockRepo.master);
-
- t.equal(evaluate(function () {
- /**
- * get one
- * @returns {number} one
- */
- function getOne() {
- return 1;
- }
- })[0].context.github,
- 'https://github.com/foo/bar/blob/this_is_the_sha/index.js#L6-L8',
- 'gets github url');
-
- mock.restore();
-
- t.end();
-});
diff --git a/test/lib/hierarchy.js b/test/lib/hierarchy.js
deleted file mode 100644
index 8a4a54edd..000000000
--- a/test/lib/hierarchy.js
+++ /dev/null
@@ -1,150 +0,0 @@
-'use strict';
-
-var test = require('tap').test,
- parse = require('../../lib/parsers/javascript'),
- hierarchy = require('../../lib/hierarchy'),
- _ = require('lodash');
-
-function toComments(fn, filename) {
- return parse({
- file: filename || 'test.js',
- source: fn instanceof Function ? '(' + fn.toString() + ')' : fn
- });
-}
-
-function evaluate(fn, callback) {
- return hierarchy(toComments(fn, callback));
-}
-
-test('hierarchy', function (t) {
- var comments = evaluate(function () {
- /**
- * @name Class
- * @class
- */
-
- /**
- * @name getFoo
- * @memberof Class
- * @instance
- */
-
- /**
- * @name isClass
- * @memberof Class
- * @static
- */
-
- /**
- * @name MAGIC_NUMBER
- * @memberof Class
- */
-
- /**
- * @name event
- * @memberof Class
- * @kind event
- * @instance
- */
- });
-
- t.deepEqual(_.pluck(comments, 'name'), ['Class']);
-
- var classMembers = comments[0].members;
-
- t.deepEqual(_.pluck(classMembers.static, 'name'), ['isClass', 'MAGIC_NUMBER']);
- t.deepEqual(_.pluck(classMembers.instance, 'name'), ['getFoo', 'event']);
-
- t.deepEqual(classMembers.static[0].path, ['Class', 'isClass']);
- t.deepEqual(classMembers.instance[0].path, ['Class', 'getFoo']);
- t.deepEqual(classMembers.instance[1].path, ['Class', 'event']);
-
- t.end();
-});
-
-test('hierarchy - nesting', function (t) {
- var comments = evaluate(function () {
- /**
- * @name Parent
- * @class
- */
-
- /**
- * @name enum
- * @memberof Parent
- */
-
- /**
- * @name Parent
- * @memberof Parent.enum
- */
-
- /**
- * @name Child
- * @memberof Parent.enum
- */
- });
-
- t.deepEqual(_.pluck(comments, 'name'), ['Parent']);
-
- var classMembers = comments[0].members;
- t.deepEqual(_.pluck(classMembers.static, 'name'), ['enum']);
-
- var enumMembers = classMembers.static[0].members;
- t.deepEqual(_.pluck(enumMembers.static, 'name'), ['Parent', 'Child']);
- t.deepEqual(enumMembers.static[0].path, ['Parent', 'enum', 'Parent']);
- t.deepEqual(enumMembers.static[1].path, ['Parent', 'enum', 'Child']);
-
- t.end();
-});
-
-test('hierarchy - multisignature', function (t) {
- var comments = evaluate(function () {
- /**
- * @name Parent
- * @class
- */
-
- /**
- * @name foo
- * @memberof Parent
- * @instance
- */
-
- /**
- * @name foo
- * @memberof Parent
- * @instance
- */
- });
-
- t.deepEqual(_.pluck(comments[0].members.instance, 'name'), ['foo', 'foo']);
- t.end();
-});
-
-test('hierarchy - missing memberof', function (t) {
- var test = evaluate(function () {
- /**
- * @name test
- * @memberof DoesNotExist
- */
- })[0];
-
- t.deepEqual(test.errors, [{
- message: '@memberof reference to DoesNotExist not found',
- commentLineNumber: 2
- }], 'correct error message');
- t.end();
-});
-
-test('hierarchy - anonymous', function (t) {
- var result = evaluate(function () {
- /** Test */
- })[0];
-
- t.equal(result.description, 'Test');
- t.deepEqual(result.errors, [{
- message: 'could not determine @name for hierarchy'
- }]);
- t.end();
-});
diff --git a/test/lib/infer/kind.js b/test/lib/infer/kind.js
deleted file mode 100644
index 4eb9ab5e3..000000000
--- a/test/lib/infer/kind.js
+++ /dev/null
@@ -1,54 +0,0 @@
-'use strict';
-/*eslint-disable no-unused-vars*/
-var test = require('tap').test,
- inferKind = require('../../../lib/infer/kind')(),
- parse = require('../../../lib/parsers/javascript');
-
-function toComment(fn, filename) {
- return parse({
- file: filename,
- source: fn instanceof Function ? '(' + fn.toString() + ')' : fn
- })[0];
-}
-
-test('inferKind', function (t) {
- t.equal(inferKind({
- kind: 'class',
- tags: []
- }).kind, 'class', 'explicit');
-
- ['class', 'constant', 'event', 'external', 'file',
- 'function', 'member', 'mixin', 'module', 'namespace', 'typedef'].forEach(function (tag) {
- var comment = { tags: [] };
- comment[tag] = true;
- t.equal(inferKind(comment).kind, tag, 'from ' + tag + ' keyword');
- });
-
- t.equal(inferKind(toComment(function () {
- /** function */
- function foo() { }
- foo();
- })).kind, 'function', 'inferred function');
-
- t.equal(inferKind(toComment(function () {
- /** function */
- var foo = function () { };
- foo();
- })).kind, 'function', 'inferred var function');
-
- t.equal(inferKind(toComment(function () {
- /** class */
- function Foo() { }
- })).kind, 'class', 'class via uppercase');
-
- t.equal(inferKind(toComment(function () {
- /** undefined */
- })).kind, undefined, 'undetectable');
-
- t.equal(inferKind(toComment(
- '/**' +
- ' * This is a constant called foo' +
- ' */' +
- 'const foo = "bar";')).kind, 'constant', 'constant via const');
- t.end();
-});
diff --git a/test/lib/infer/membership.js b/test/lib/infer/membership.js
deleted file mode 100644
index a5c70b0a7..000000000
--- a/test/lib/infer/membership.js
+++ /dev/null
@@ -1,343 +0,0 @@
-'use strict';
-
-var test = require('tap').test,
- _ = require('lodash'),
- parse = require('../../../lib/parsers/javascript'),
- inferMembership = require('../../../lib/infer/membership')();
-
-function toComment(fn, file) {
- return parse({
- file: file,
- source: fn instanceof Function ? '(' + fn.toString() + ')' : fn
- });
-}
-
-function evaluate(fn, file) {
- return toComment(fn, file).map(inferMembership);
-}
-
-function Foo() {}
-function lend() {}
-
-test('inferMembership - explicit', function (t) {
- t.deepEqual(_.pick(evaluate(function () {
- /**
- * Test
- * @memberof Bar
- * @static
- */
- Foo.bar = 0;
- })[0], ['memberof', 'scope']), {
- memberof: 'Bar',
- scope: 'static'
- }, 'explicit');
-
- t.deepEqual(_.pick(evaluate(function () {
- /** Test */
- Foo.bar = 0;
- })[0], ['memberof', 'scope']), {
- memberof: 'Foo',
- scope: 'static'
- }, 'implicit');
-
- t.deepEqual(_.pick(evaluate(function () {
- /** Test */
- Foo.prototype.bar = 0;
- })[0], ['memberof', 'scope']), {
- memberof: 'Foo',
- scope: 'instance'
- }, 'instance');
-
- t.deepEqual(_.pick(evaluate(function () {
- /** Test */
- Foo.bar.baz = 0;
- })[0], ['memberof', 'scope']), {
- memberof: 'Foo.bar',
- scope: 'static'
- }, 'compound');
-
- t.deepEqual(_.pick(evaluate(function () {
- /** Test */
- (0).baz = 0;
- })[0], ['memberof', 'scope']), { }, 'unknown');
-
- t.deepEqual(_.pick(evaluate(function () {
- Foo.bar = {
- /** Test */
- baz: 0
- };
- })[0], ['memberof', 'scope']), {
- memberof: 'Foo.bar',
- scope: 'static'
- }, 'static object assignment');
-
- t.deepEqual(_.pick(evaluate(function () {
- Foo.prototype = {
- /** Test */
- bar: 0
- };
- })[0], ['memberof', 'scope']), {
- memberof: 'Foo',
- scope: 'instance'
- }, 'instance object assignment');
-
- t.deepEqual(_.pick(evaluate(function () {
- Foo.prototype = {
- /**
- * Test
- */
- bar: function () {}
- };
- })[0], ['memberof', 'scope']), {
- memberof: 'Foo',
- scope: 'instance'
- }, 'instance object assignment, function');
-
- t.deepEqual(_.pick(evaluate(function () {
- var Foo = {
- /** Test */
- baz: 0
- };
- return Foo;
- })[0], ['memberof', 'scope']), {
- memberof: 'Foo',
- scope: 'static'
- }, 'variable object assignment');
-
- t.deepEqual(_.pick(evaluate(function () {
- var Foo = {
- /** Test */
- baz: function () {}
- };
- return Foo;
- })[0], ['memberof', 'scope']), {
- memberof: 'Foo',
- scope: 'static'
- }, 'variable object assignment, function');
-
- t.deepEqual(_.pick(evaluate(function () {
- /** Test */
- module.exports = function () {};
- })[0], ['memberof', 'scope']), {
- memberof: 'module',
- scope: 'static'
- }, 'simple');
-
- t.deepEqual(_.pick(evaluate(function () {
- lend(/** @lends Foo */{
- /** Test */
- bar: 0
- });
- })[1], ['memberof', 'scope']), {
- memberof: 'Foo',
- scope: 'static'
- }, 'lends, static');
-
- t.deepEqual(_.pick(evaluate(function () {
- lend(/** @lends Foo */{
- /** Test */
- bar: function () {}
- });
- })[1], ['memberof', 'scope']), {
- memberof: 'Foo',
- scope: 'static'
- }, 'inferMembership - lends, static, function');
-
- t.deepEqual(_.pick(evaluate(function () {
- lend(/** @lends Foo.prototype */{
- /** Test */
- bar: 0
- });
- })[1], ['memberof', 'scope']), {
- memberof: 'Foo',
- scope: 'instance'
- });
-
- t.deepEqual(_.pick(evaluate(function () {
- lend(/** @lends Foo.prototype */{
- /** Test */
- bar: function () {}
- });
- })[1], ['memberof', 'scope']), {
- memberof: 'Foo',
- scope: 'instance'
- }, 'inferMembership - lends, instance, function');
-
- t.equal(evaluate(function () {
- lend(/** @lends Foo */{});
- /** Test */
- })[1].memberof, undefined, 'inferMembership - lends applies only to following object');
-
- t.equal(evaluate(function () {
- lend(/** @lends Foo */{});
- })[0], undefined, 'inferMembership - drops lends');
-
- t.end();
-});
-
-test('inferMembership - exports', function (t) {
- t.equal(evaluate(function () {
- /** @module mod */
- /** foo */
- exports.foo = 1;
- })[1].memberof, 'mod');
-
- t.equal(evaluate(function () {
- /** @module mod */
- /** foo */
- exports.foo = function () {};
- })[1].memberof, 'mod');
-
- t.equal(evaluate(function () {
- /** @module mod */
- /** bar */
- exports.foo.bar = 1;
- })[1].memberof, 'mod.foo');
-
- t.equal(evaluate(function () {
- /** @module mod */
- exports.foo = {
- /** bar */
- bar: 1
- };
- })[1].memberof, 'mod.foo');
-
- t.equal(evaluate(function () {
- /** @module mod */
- exports.foo = {
- /** bar */
- bar: function () {}
- };
- })[1].memberof, 'mod.foo');
-
- t.equal(evaluate(function () {
- /** @module mod */
- /** bar */
- exports.foo.prototype.bar = function () {};
- })[1].memberof, 'mod.foo');
-
- t.equal(evaluate(function () {
- /** @module mod */
- exports.foo.prototype = {
- /** bar */
- bar: function () {}
- };
- })[1].memberof, 'mod.foo');
-
- t.end();
-});
-
-test('inferMembership - module.exports', function (t) {
- t.equal(evaluate(function () {
- /** @module mod */
- /** foo */
- module.exports.foo = 1;
- })[1].memberof, 'mod');
-
- t.equal(evaluate(function () {
- /** @module mod */
- /** foo */
- module.exports.foo = function () {};
- })[1].memberof, 'mod');
-
- t.equal(evaluate(function () {
- /** @module mod */
- /** bar */
- module.exports.foo.bar = 1;
- })[1].memberof, 'mod.foo');
-
- t.equal(evaluate(function () {
- /** @module mod */
- module.exports.foo = {
- /** bar */
- bar: 1
- };
- })[1].memberof, 'mod.foo');
-
- t.equal(evaluate(function () {
- /** @module mod */
- module.exports.foo = {
- /** bar */
- bar: function () {}
- };
- })[1].memberof, 'mod.foo');
-
- t.equal(evaluate(function () {
- /** @module mod */
- /** bar */
- module.exports.prototype.bar = function () {};
- })[1].memberof, 'mod');
-
- t.equal(evaluate(function () {
- /** @module mod */
- module.exports.prototype = {
- /** bar */
- bar: function () {}
- };
- })[1].memberof, 'mod');
-
- t.equal(evaluate(function () {
- /**
- * @module mod
- * @name exports
- */
- module.exports = 1;
- })[0].memberof, undefined);
-
- t.equal(evaluate(function () {
- /**
- * @module mod
- * @name exports
- */
- module.exports = function () {};
- })[0].memberof, undefined);
-
- t.equal(evaluate(function () {
- /** @module mod */
- module.exports = {
- /** foo */
- foo: 1
- };
- })[1].memberof, 'mod');
-
- t.end();
-});
-
-test('inferMembership - not module exports', function (t) {
- var result = evaluate(function () {
- /**
- * @module mod
- */
- /** Test */
- global.module.exports.foo = 1;
- }, '/path/mod.js');
-
- t.equal(result.length, 2);
- t.notEqual(result[0].memberof, 'mod');
- t.end();
-});
-
-test('inferMembership - anonymous @module', function (t) {
- var result = evaluate(function () {
- /**
- * @module
- */
- /** Test */
- exports.foo = 1;
- }, '/path/mod.js');
-
- t.equal(result.length, 2);
- t.equal(result[1].memberof, 'mod');
- t.end();
-});
-
-test('inferMembership - no @module', function (t) {
- var result = evaluate(function () {
- /** Test */
- exports.foo = 1;
- }, '/path/mod.js');
-
- t.equal(result.length, 1);
- t.equal(result[0].memberof, 'mod');
- t.end();
-});
diff --git a/test/lib/infer/name.js b/test/lib/infer/name.js
deleted file mode 100644
index 5814ae74a..000000000
--- a/test/lib/infer/name.js
+++ /dev/null
@@ -1,151 +0,0 @@
-'use strict';
-
-var test = require('tap').test,
- parse = require('../../../lib/parsers/javascript'),
- inferName = require('../../../lib/infer/name')();
-
-function toComment(fn, file) {
- return parse({
- file: file,
- source: fn instanceof Function ? '(' + fn.toString() + ')' : fn
- })[0];
-}
-
-function evaluate(fn, file) {
- return inferName(toComment(fn, file));
-}
-
-test('inferName', function (t) {
- t.equal(evaluate(function () {
- // ExpressionStatement (comment attached here)
- // AssignmentExpression
- // MemberExpression
- // Identifier
- /** Test */
- exports.name = test;
- }).name, 'name', 'expression statement');
-
- t.equal(evaluate(function () {
- // ExpressionStatement
- // AssignmentExpression
- // MemberExpression (comment attached here)
- // FunctionExpression
- /** Test */
- exports.name = function () {};
- }).name, 'name', 'expression statement, function');
-
- t.equal(evaluate(function () {
- exports = {
- // Property (comment attached here)
- // Identifier
- // FunctionExpression
- /** Test */
- name: test
- };
- }).name, 'name', 'property');
-
- t.equal(evaluate(function () {
- exports = {
- // Property
- // Identifier (comment attached here)
- // FunctionExpression
- /** Test */
- name: function () {}
- };
- }).name, 'name', 'property, function');
-
- t.equal(evaluate(function () {
- /** Test */
- function name() {}
- return name;
- }).name, 'name', 'function declaration');
-
- t.equal(evaluate(function () {
- /** Test */
- var name = function () {};
- return name;
- }).name, 'name', 'anonymous function expression');
-
- t.equal(evaluate(function () {
- /** Test */
- var name = function name2() {};
- return name;
- }).name, 'name', 'named function expression');
-
- t.equal(evaluate(function () {
- /**
- * Test
- * @name explicitName
- */
- function implicitName() {}
- return implicitName;
- }).name, 'explicitName', 'explicit name');
-
- t.equal(evaluate(function () {
- /** @class ExplicitClass */
- function ImplicitClass() {}
- return ImplicitClass;
- }).name, 'ExplicitClass', 'explicit class');
-
- t.equal(evaluate(function () {
- /** @class */
- function ImplicitClass() {}
- return ImplicitClass;
- }).name, 'ImplicitClass', 'anonymous class');
-
- t.equal(evaluate(function () {
- /**
- * @event explicitEvent
- */
- function implicitName() {}
- return implicitName;
- }).name, 'explicitEvent', 'explicitEvent');
-
- t.equal(evaluate(function () {
- /**
- * @typedef {Object} ExplicitTypedef
- */
- function implicitName() {}
- return implicitName;
- }).name, 'ExplicitTypedef', 'ExplicitTypedef');
-
- t.equal(evaluate(function () {
- /**
- * @callback explicitCallback
- */
- function implicitName() {}
- return implicitName;
- }).name, 'explicitCallback', 'explicitCallback');
-
- t.equal(evaluate(function () {
- /**
- * @module explicitModule
- */
- function implicitName() {}
- return implicitName;
- }).name, 'explicitModule');
-
- t.equal(evaluate(function () {
- /**
- * @module {Function} explicitModule
- */
- function implicitName() {}
- return implicitName;
- }).name, 'explicitModule');
-
- t.equal(evaluate(function () {
- /**
- * @module
- */
- function implicitName() {}
- return implicitName;
- }, '/path/inferred-from-file.js').name, 'inferred-from-file');
-
- t.equal(evaluate(function () {
- /**
- * @module
- */
- }, '/path/inferred-from-file.js').name, 'inferred-from-file');
-
- t.end();
-});
diff --git a/test/lib/input/shallow.js b/test/lib/input/shallow.js
deleted file mode 100644
index 7a5f92482..000000000
--- a/test/lib/input/shallow.js
+++ /dev/null
@@ -1,40 +0,0 @@
-'use strict';
-
-var test = require('tap').test,
- path = require('path'),
- shallow = require('../../../lib/input/shallow');
-
-test('shallow deps', function (t) {
- shallow([path.resolve(path.join(__dirname, '../../fixture/es6.input.js'))], {}, function (err, deps) {
- t.ifError(err);
- t.equal(deps.length, 1);
- t.ok(deps[0].file, 'has file');
- t.end();
- });
-});
-
-test('shallow deps multi', function (t) {
- shallow([
- path.resolve(path.join(__dirname, '../../fixture/es6.input.js')),
- path.resolve(path.join(__dirname, '../../fixture/es6.output.json'))
- ], {}, function (err, deps) {
- t.ifError(err);
- t.equal(deps.length, 2);
- t.ok(deps[0].file, 'has file');
- t.end();
- });
-});
-
-test('shallow deps literal', function (t) {
- var obj = {
- file: 'foo.js',
- source: '//bar'
- };
- shallow([
- obj
- ], {}, function (err, deps) {
- t.ifError(err);
- t.equal(deps[0], obj);
- t.end();
- });
-});
diff --git a/test/lib/lint.js b/test/lib/lint.js
deleted file mode 100644
index ffcbf8222..000000000
--- a/test/lib/lint.js
+++ /dev/null
@@ -1,67 +0,0 @@
-'use strict';
-
-var test = require('tap').test,
- parse = require('../../lib/parsers/javascript'),
- lintComments = require('../../lib/lint').lintComments,
- formatLint = require('../../lib/lint').formatLint;
-
-function toComment(fn, filename) {
- return parse({
- file: filename,
- source: fn instanceof Function ? '(' + fn.toString() + ')' : fn
- })[0];
-}
-
-function evaluate(fn) {
- return lintComments(toComment(fn, 'input.js'));
-}
-
-test('lintComments', function (t) {
- t.deepEqual(evaluate(function () {
- /**
- * @param {String} foo
- * @param {array} bar
- * @param {foo
- */
- }).errors, [
- { message: 'Braces are not balanced' },
- { message: 'Missing or invalid tag name' },
- { commentLineNumber: 1, message: 'type String found, string is standard' },
- { commentLineNumber: 2, message: 'type array found, Array is standard' }],
- 'non-canonical');
-
- var comment = evaluate(function () {/**
- * @param {String} foo
- * @param {array} bar
- */
- });
-
- t.deepEqual(evaluate(function () {
- /**
- * @param {string} foo
- */
- }).errors, [], 'no errors');
-
- t.end();
-});
-
-test('formatLint', function (t) {
- var comment = evaluate(function () {
- /**
- * @param {String} foo
- * @param {array} bar
- * @param {foo
- */
- });
-
- var formatted = formatLint([comment]);
-
- t.contains(formatted, 'input.js');
- t.contains(formatted, /1:1[^\n]+Braces are not balanced/);
- t.contains(formatted, /1:1[^\n]+Missing or invalid tag name/);
- t.contains(formatted, /3:1[^\n]+type String found, string is standard/);
- t.contains(formatted, /4:1[^\n]+type array found, Array is standard/);
- t.contains(formatted, '4 warnings');
-
- t.end();
-});
diff --git a/test/lib/load_config.js b/test/lib/load_config.js
deleted file mode 100644
index d8ec8ba42..000000000
--- a/test/lib/load_config.js
+++ /dev/null
@@ -1,20 +0,0 @@
-'use strict';
-
-var test = require('tap').test,
- path = require('path'),
- loadConfig = require('../../lib/load_config');
-
-test('loadConfig', function (t) {
-
- t.throws(function () {
- loadConfig('DOES-NOT-EXIST');
- });
-
- t.deepEqual(loadConfig(path.join(__dirname, '../config_fixture/config.json')),
- { foo: 'bar' });
-
- t.deepEqual(loadConfig(path.join(__dirname, '../config_fixture/config_comments.json')),
- { foo: 'bar' }, 'config with comments');
-
- t.end();
-});
diff --git a/test/lib/markdown_format_type.js b/test/lib/markdown_format_type.js
deleted file mode 100644
index 934b8356b..000000000
--- a/test/lib/markdown_format_type.js
+++ /dev/null
@@ -1,37 +0,0 @@
-'use strict';
-
-var formatType = require('../../lib/markdown_format_type.js'),
- test = require('tap').test;
-
-test('formatType', function (t) {
- t.deepEqual(formatType(), '', 'null case');
- t.deepEqual(formatType({
- type: 'NameExpression',
- name: 'Foo'
- }), 'Foo', 'name expression');
-
- t.deepEqual(formatType({
- type: 'UnionType',
- elements: [{
- type: 'NameExpression',
- name: 'Foo'
- }, {
- type: 'NameExpression',
- name: 'Bar'
- }]
- }), 'Foo or Bar', 'union expression');
-
- t.deepEqual(formatType({
- type: 'OptionalType',
- expression: {
- type: 'NameExpression',
- name: 'Foo'
- }
- }), '[Foo]', 'optional type');
-
- t.deepEqual(formatType({
- type: 'AllLiteral'
- }), 'Any', 'all literal');
-
- t.end();
-});
diff --git a/test/lib/nest.js b/test/lib/nest.js
deleted file mode 100644
index 5b4aa286b..000000000
--- a/test/lib/nest.js
+++ /dev/null
@@ -1,90 +0,0 @@
-'use strict';
-
-var test = require('tap').test,
- parse = require('../../lib/parsers/javascript'),
- nest = require('../../lib/nest');
-
-function toComment(fn, filename) {
- return parse({
- file: filename,
- source: fn instanceof Function ? '(' + fn.toString() + ')' : fn
- }).map(nest);
-}
-
-test('nest params - no params', function (t) {
- t.equal(toComment(function () {
- /** @name foo */
- })[0].params, undefined, 'no params');
- t.end();
-});
-
-test('nest params - no nesting', function (t) {
- var result = toComment(function () {
- /** @param {Object} foo */
- });
- t.equal(result[0].params.length, 1);
- t.equal(result[0].params[0].name, 'foo');
- t.equal(result[0].params[0].properties, undefined);
- t.end();
-});
-
-test('nest params - basic', function (t) {
- var result = toComment(function () {
- /**
- * @param {Object} foo
- * @param {string} foo.bar
- * @param {string} foo.baz
- */
- });
- t.equal(result[0].params.length, 1);
- t.equal(result[0].params[0].name, 'foo');
- t.equal(result[0].params[0].properties.length, 2);
- t.equal(result[0].params[0].properties[0].name, 'foo.bar');
- t.equal(result[0].params[0].properties[1].name, 'foo.baz');
- t.end();
-});
-
-test('nest properties - basic', function (t) {
- var result = toComment(function () {
- /**
- * @property {Object} foo
- * @property {string} foo.bar
- * @property {string} foo.baz
- */
- });
- t.equal(result[0].properties.length, 1);
- t.equal(result[0].properties[0].name, 'foo');
- t.equal(result[0].properties[0].properties.length, 2);
- t.equal(result[0].properties[0].properties[0].name, 'foo.bar');
- t.equal(result[0].properties[0].properties[1].name, 'foo.baz');
- t.end();
-});
-
-test('nest params - array', function (t) {
- var result = toComment(function () {
- /**
- * @param {Object[]} employees - The employees who are responsible for the project.
- * @param {string} employees[].name - The name of an employee.
- * @param {string} employees[].department - The employee's department.
- */
- });
- t.equal(result[0].params.length, 1);
- t.equal(result[0].params[0].name, 'employees');
- t.equal(result[0].params[0].properties.length, 2);
- t.equal(result[0].params[0].properties[0].name, 'employees[].name');
- t.equal(result[0].params[0].properties[1].name, 'employees[].department');
- t.end();
-});
-
-test('nest params - missing parent', function (t) {
- var result = toComment(function () {
- /** @param {string} foo.bar */
- });
- t.equal(result[0].params.length, 1);
- t.deepEqual(result[0].errors[0], {
- message: '@param foo.bar\'s parent foo not found',
- commentLineNumber: 0
- }, 'correct error message');
- t.equal(result[0].params[0].name, 'foo.bar');
- t.end();
-});
diff --git a/test/lib/normalize.js b/test/lib/normalize.js
deleted file mode 100644
index c6b8eaa1b..000000000
--- a/test/lib/normalize.js
+++ /dev/null
@@ -1,11 +0,0 @@
-'use strict';
-
-var test = require('tap').test,
- normalize = require('../../lib/normalize');
-
-test('normalizes tags', function (t) {
- t.deepEqual(normalize({ tags: [{ title: 'return' }]}), { tags: [{ title: 'returns' }]});
- t.deepEqual(normalize({ tags: [{ title: 'extends' }]}), { tags: [{ title: 'augments' }]});
- t.deepEqual(normalize({ tags: [{ title: 'name' }]}), { tags: [{ title: 'name' }]});
- t.end();
-});
diff --git a/test/lib/parsers/javascript.js b/test/lib/parsers/javascript.js
deleted file mode 100644
index f486e155e..000000000
--- a/test/lib/parsers/javascript.js
+++ /dev/null
@@ -1,27 +0,0 @@
-'use strict';
-
-var test = require('tap').test,
- parse = require('../../../lib/parsers/javascript');
-
-function toComment(fn, filename) {
- return parse({
- file: filename || 'test.js',
- source: fn instanceof Function ? '(' + fn.toString() + ')' : fn
- });
-}
-
-test('parse - unknown tag', function (t) {
- t.equal(toComment(function () {
- /** @unknown */
- })[0].tags[0].title, 'unknown');
- t.end();
-});
-
-test('parse - error', function (t) {
- t.deepEqual(toComment(function () {
- /** @param {foo */
- })[0].errors, [
- { message: 'Braces are not balanced' },
- { message: 'Missing or invalid tag name' }]);
- t.end();
-});
diff --git a/test/lib/polyglot.js b/test/lib/polyglot.js
deleted file mode 100644
index 46e959168..000000000
--- a/test/lib/polyglot.js
+++ /dev/null
@@ -1,38 +0,0 @@
-'use strict';
-
-var test = require('tap').test,
- fs = require('fs'),
- path = require('path'),
- polyglot = require('../../lib/parsers/polyglot');
-
-test('polyglot', function (t) {
- var file = path.resolve(path.join(__dirname, '../fixture/polyglot/blend.cpp'));
- var result = polyglot({
- file: file,
- source: fs.readFileSync(file, 'utf8')
- });
- delete result[0].context.file;
- t.deepEqual(result, [{
- errors: [],
- context: {
- loc: { end: { column: 3, line: 40 }, start: { column: 1, line: 35 } } },
- description: 'This method moves a hex to a color',
- loc: { end: { column: 3, line: 40 }, start: { column: 1, line: 35 } },
- name: 'hexToUInt32Color', params: [
- { description: null, lineNumber: 3, name: 'hex', title: 'param',
- type: { name: 'string', type: 'NameExpression' } } ],
- returns: [
- {
- description: 'color',
- lineNumber: 4,
- title: 'returns',
- type: { name: 'number', type: 'NameExpression' } } ],
- tags: [ { description: null, lineNumber: 2, name: 'hexToUInt32Color', title: 'name' },
- { description: null, lineNumber: 3, name: 'hex', title: 'param', type: {
- name: 'string', type: 'NameExpression'
- } },
- { description: 'color', lineNumber: 4, title: 'returns', type: {
- name: 'number', type: 'NameExpression'
- } } ] } ], 'polyglot parser');
- t.end();
-});
diff --git a/test/lib/resolve_theme.js b/test/lib/resolve_theme.js
deleted file mode 100644
index 8cc223d77..000000000
--- a/test/lib/resolve_theme.js
+++ /dev/null
@@ -1,15 +0,0 @@
-'use strict';
-
-var test = require('tap').test,
- resolveTheme = require('../../lib/resolve_theme');
-
-test('resolveTheme', function (t) {
-
- t.throws(function () {
- resolveTheme('INVALID-THEME');
- });
-
- t.ok(resolveTheme('documentation-theme-default'), 'finds default');
-
- t.end();
-});
diff --git a/test/lib/server.js b/test/lib/server.js
deleted file mode 100644
index 23df44bc6..000000000
--- a/test/lib/server.js
+++ /dev/null
@@ -1,83 +0,0 @@
-'use strict';
-
-var test = require('tap').test,
- get = require('../utils').get,
- File = require('vinyl'),
- Server = require('../../lib/server');
-
-var jsFile = new File({
- cwd: '/',
- base: '/test/',
- path: '/test/file.js',
- contents: new Buffer('var test = 123;')
-});
-
-var coffeeFile = new File({
- cwd: '/',
- base: '/test/',
- path: '/test/file.coffee',
- contents: new Buffer('test = 123')
-});
-
-var indexFile = new File({
- cwd: '/',
- base: '/test/',
- path: '/test/index.html',
- contents: new Buffer('')
-});
-
-test('server', function (t) {
- var server = new Server();
- t.ok(server, 'server is initialized');
- server.start(function () {
-
- t.test('start can be called more than once, without a callback', function (tt) {
- server.start();
- tt.end();
- });
-
- t.test('base path', function (tt) {
- get('http://localhost:4001/file.coffee', function (code) {
- tt.equal(code, 404, 'does not have a file, emits 404');
- tt.end();
- });
- });
-
- t.test('base path', function (tt) {
- server.setFiles([coffeeFile]);
- get('http://localhost:4001/file.coffee', function (text) {
- tt.equal(text, 'test = 123', 'emits response');
- tt.end();
- });
- });
-
- t.test('reset files', function (tt) {
- server.setFiles([coffeeFile, jsFile]);
- get('http://localhost:4001/file.js', function (text) {
- tt.equal(text, 'var test = 123;', 'emits response');
- tt.end();
- });
- });
-
- t.test('index.html special case', function (tt) {
- server.setFiles([coffeeFile, indexFile, jsFile]);
- get('http://localhost:4001/', function (text) {
- tt.equal(text, '', 'sends index.html when / is requested');
- tt.end();
- });
- });
-
- t.test('cleanup', function (tt) {
- server.stop(function () {
- tt.end();
- });
- });
-
- t.test('stop can be called more than once, without a callback', function (tt) {
- server.stop();
- tt.end();
- });
-
- t.end();
- });
-});
diff --git a/test/lib/sort.js b/test/lib/sort.js
deleted file mode 100644
index 202264a66..000000000
--- a/test/lib/sort.js
+++ /dev/null
@@ -1,49 +0,0 @@
-'use strict';
-
-var test = require('tap').test,
- sort = require('../../lib/sort');
-
-test('sort stream alphanumeric', function (t) {
-
- t.deepEqual([
- { name: 'apples' },
- { name: 'carrot' },
- { name: 'bananas' }].sort(sort.bind(undefined, null)), [
- { name: 'apples' },
- { name: 'bananas' },
- { name: 'carrot' }
- ], 'sort stream alphanumeric');
-
- t.deepEqual([{ name: 'apples' },
- { name: 'carrot' },
- { name: '2' },
- { name: '10' }].sort(sort.bind(undefined, ['apples', '2', 'carrot', '10'])), [
- { 'name': 'apples' },
- { 'name': '2' },
- { 'name': 'carrot' },
- { 'name': '10'}
- ], 'sort stream with explicit order for all');
-
- t.deepEqual([{ name: 'apples' },
- { name: 'carrot' },
- { name: '2' },
- { name: '10' }].sort(sort.bind(undefined, ['carrot', '10'])), [
- { 'name': 'carrot' },
- { 'name': '10'},
- { 'name': '2' },
- { 'name': 'apples' }
- ], 'sort stream with explicit order for some');
-
- t.deepEqual([
- { name: '10' },
- { name: '2' },
- { name: 'apples' },
- { name: 'carrot'}
- ].sort(sort.bind(undefined, null)),
- [{ name: '10' },
- { name: '2' },
- { name: 'apples' },
- { name: 'carrot' }], 'sort stream with numbers');
-
- t.end();
-});
diff --git a/test/lib/walk.js b/test/lib/walk.js
deleted file mode 100644
index 1f20f7928..000000000
--- a/test/lib/walk.js
+++ /dev/null
@@ -1,74 +0,0 @@
-'use strict';
-
-var test = require('tap').test,
- walk = require('../../lib/walk');
-
-test('walk', function (group) {
-
- group.test('flat comments', function (t) {
-
- var comments = [{ name: 'Tom' }];
-
- function renamer(comment, options) {
- if (options) {
- comment.name = options.name;
- } else {
- comment.name = 'Tim';
- }
- }
-
- t.deepEqual(walk(comments, renamer), [
- { name: 'Tim' }
- ], 'no-option case');
-
- t.deepEqual(walk(comments, renamer, { name: 'John' }), [
- { name: 'John' }
- ], 'with options');
-
- t.end();
- });
-
- group.test('nested comments', function (t) {
-
- var comments = [{
- name: 'Tom',
- members: {
- static: [{
- name: 'Billy'
- }]
- }
- }];
-
- function renamer(comment, options) {
- if (options) {
- comment.name = options.name;
- } else {
- comment.name = 'Tim';
- }
- }
-
- t.deepEqual(walk(comments, renamer), [{
- name: 'Tim',
- members: {
- static: [{
- name: 'Tim'
- }]
- }
- }], 'no-option case');
-
- t.deepEqual(walk(comments, renamer, {
- name: 'Bob'
- }), [{
- name: 'Bob',
- members: {
- static: [{
- name: 'Bob'
- }]
- }
- }], 'with options');
-
- t.end();
- });
-
- group.end();
-});
diff --git a/test/misc/index.js b/test/misc/index.js
deleted file mode 100644
index 775eb734b..000000000
--- a/test/misc/index.js
+++ /dev/null
@@ -1 +0,0 @@
-// foo
diff --git a/test/normalize.js b/test/normalize.js
deleted file mode 100644
index f3aa4fcc4..000000000
--- a/test/normalize.js
+++ /dev/null
@@ -1,10 +0,0 @@
-var walk = require('../lib/walk');
-
-module.exports = function (comments) {
- return walk(comments, function (comment) {
- delete comment.context.file;
- if (comment.context.github) {
- comment.context.github = '[github]';
- }
- });
-}
diff --git a/test/test.js b/test/test.js
deleted file mode 100644
index bf6b848d2..000000000
--- a/test/test.js
+++ /dev/null
@@ -1,253 +0,0 @@
-'use strict';
-
-var test = require('tap').test,
- documentation = require('../'),
- outputMarkdown = require('../lib/output/markdown.js'),
- outputMarkdownAST = require('../lib/output/markdown_ast.js'),
- outputHtml = require('../lib/output/html.js'),
- normalize = require('./normalize'),
- glob = require('glob'),
- path = require('path'),
- fs = require('fs'),
- chdir = require('chdir');
-
-var UPDATE = !!process.env.UPDATE;
-
-function makePOJO(ast) {
- return JSON.parse(JSON.stringify(ast));
-}
-
-if (fs.existsSync(path.join(__dirname, '../.git'))) {
- test('git option', function (t) {
- var file = path.join(__dirname, './fixture/simple.input.js');
- documentation([file], { github: true }, function (err, result) {
- t.ifError(err);
- normalize(result);
- var outputfile = file.replace('.input.js', '.output.github.json');
- if (UPDATE) {
- fs.writeFileSync(outputfile, JSON.stringify(result, null, 2));
- }
- var expect = require(outputfile);
- t.deepEqual(result, expect);
-
- outputMarkdown(result, null, function (err, result) {
- t.ifError(err);
- var outputfile = file.replace('.input.js', '.output.github.md');
- if (UPDATE) {
- fs.writeFileSync(outputfile, result, 'utf8');
- }
- var expect = fs.readFileSync(outputfile, 'utf8');
- t.equal(result.toString(), expect, 'markdown output correct');
- t.end();
- });
- });
- });
-}
-
-test('external modules option', function (t) {
- documentation([
- path.join(__dirname, 'fixture', 'external.input.js')
- ], {
- external: '(external|external/node_modules/*)'
- }, function (err, result) {
- t.ifError(err);
- normalize(result);
- var outputfile = path.join(__dirname, 'fixture', '_external-deps-included.json');
- if (UPDATE) {
- fs.writeFileSync(outputfile, JSON.stringify(result, null, 2));
- }
- var expect = require(outputfile);
- t.deepEqual(result, expect);
- t.end();
- });
-});
-
-test('parse', function (tt) {
- glob.sync(path.join(__dirname, 'fixture', '*.input.js')).forEach(function (file) {
- tt.test(file, function (t) {
- documentation([file], null, function (err, result) {
- t.ifError(err);
- normalize(result);
- var outputfile = file.replace('.input.js', '.output.json');
- if (UPDATE) {
- fs.writeFileSync(outputfile, JSON.stringify(result, null, 2));
- }
- var expect = require(outputfile);
- t.deepEqual(makePOJO(result), expect);
- t.end();
- });
- });
- });
- tt.end();
-});
-
-test('bad input', function (tt) {
- glob.sync(path.join(__dirname, 'fixture/bad', '*.input.js')).forEach(function (file) {
- tt.test(path.basename(file), function (t) {
- documentation([file], null, function (error, res) {
- t.equal(res, undefined);
- // make error a serializable object
- error = JSON.parse(JSON.stringify(error));
- // remove system-specific path
- delete error.filename;
- delete error.codeFrame;
- var outputfile = file.replace('.input.js', '.output.json');
- if (UPDATE) {
- fs.writeFileSync(outputfile, JSON.stringify(error, null, 2));
- }
- var expect = JSON.parse(fs.readFileSync(outputfile));
- t.deepEqual(error, expect);
- t.end();
- });
- });
- });
- tt.end();
-});
-
-test('html', function (tt) {
- glob.sync(path.join(__dirname, 'fixture/html', '*.input.js')).forEach(function (file) {
- tt.test(path.basename(file), function (t) {
- documentation([file], null, function (err, result) {
- t.ifError(err);
- outputHtml(result, null, function (err, result) {
- t.ifError(err);
- var clean = result.sort(function (a, b) {
- return a.path > b.path;
- }).filter(function (r) {
- return (!r.path.match(/json$/));
- }).map(function (r) {
- return r.contents;
- }).join('\n');
- var outputfile = file.replace('.input.js', '.output.files');
- if (UPDATE) {
- fs.writeFileSync(outputfile, clean, 'utf8');
- }
- var expect = fs.readFileSync(outputfile, 'utf8');
- t.deepEqual(clean, expect);
- t.end();
- });
- });
- });
- });
- tt.end();
-});
-
-test('markdown', function (tt) {
- glob.sync(path.join(__dirname, 'fixture', '*.input.js')).forEach(function (file) {
- tt.test(path.basename(file), function (t) {
- documentation([file], null, function (err, result) {
- t.ifError(err);
- outputMarkdown(result, null, function (err, result) {
- t.ifError(err);
- var outputfile = file.replace('.input.js', '.output.md');
- if (UPDATE) {
- fs.writeFileSync(outputfile, result, 'utf8');
- }
- var expect = fs.readFileSync(outputfile, 'utf8');
- t.equal(result.toString(), expect, 'markdown output correct');
- t.end();
- });
- });
- });
-
- tt.test(path.basename(file), function (t) {
- documentation([file], null, function (err, result) {
- t.ifError(err);
- outputMarkdownAST(result, null, function (err, result) {
- t.ifError(err);
- var outputfile = file.replace('.input.js', '.output.md.json');
- if (UPDATE) {
- fs.writeFileSync(outputfile, JSON.stringify(result, null, 2), 'utf8');
- }
- var expect = JSON.parse(fs.readFileSync(outputfile, 'utf8'));
- t.deepEqual(result, expect, 'markdown AST output correct');
- t.end();
- });
- });
- });
-
- tt.test(path.basename(file) + ' custom', function (t) {
- documentation([file], null, function (err, result) {
- t.ifError(err);
- outputMarkdown(result, {
- theme: path.join(__dirname, '/misc/')
- }, function (err, result) {
- t.ifError(err);
- var outputfile = file.replace('.input.js', '.output.custom.md');
- if (UPDATE) {
- fs.writeFileSync(outputfile, result, 'utf8');
- }
- var expect = fs.readFileSync(outputfile, 'utf8');
- t.equal(result.toString(), expect, 'custom output correct');
- t.end();
- });
- });
- });
- });
- tt.end();
-});
-
-test('highlightAuto md output', function (t) {
- var file = path.join(__dirname, 'fixture/auto_lang_hljs/multilanguage.input.js'),
- hljsConfig = {hljs: {highlightAuto: true, languages: ['js', 'css', 'html']}};
-
- documentation(file, null, function (err, result) {
- t.ifError(err);
- outputMarkdown(result, hljsConfig, function (err, result) {
- t.ifError(err);
- var outputfile = file.replace('.input.js', '.output.md');
- if (UPDATE) {
- fs.writeFileSync(outputfile, result, 'utf8');
- }
- var expect = fs.readFileSync(outputfile, 'utf8');
- t.equal(result.toString(), expect, 'recognizes examples in html, css and js');
- t.end();
- });
- });
-});
-
-test('multi-file input', function (t) {
- documentation([
- path.join(__dirname, 'fixture', 'simple.input.js'),
- path.join(__dirname, 'fixture', 'simple-two.input.js')
- ], null, function (err, result) {
- t.ifError(err);
- normalize(result);
- var outputfile = path.join(__dirname, 'fixture', '_multi-file-input.json');
- if (UPDATE) {
- fs.writeFileSync(outputfile, JSON.stringify(result, null, 2));
- }
- var expect = require(outputfile);
- t.deepEqual(result, expect);
- t.end();
- });
-});
-
-test('accepts simple relative paths', function (t) {
- chdir(__dirname, function () {
- documentation('fixture/simple.input.js', null, function (err, data) {
- t.ifError(err);
- t.equal(data.length, 1, 'simple has no dependencies');
- t.end();
- });
- });
-});
-
-test('.lint', function (t) {
- chdir(__dirname, function () {
- documentation.lint('fixture/simple.input.js', null, function (err, data) {
- t.ifError(err);
- t.equal(data, '', 'outputs lint information');
- t.end();
- });
- });
-});
-
-test('.lint with bad input', function (t) {
- chdir(__dirname, function () {
- documentation.lint('fixture/bad/syntax.input.js', null, function (err, data) {
- t.ok(err, 'returns an error when syntax is incorrect');
- t.end();
- });
- });
-});
diff --git a/test/utils.js b/test/utils.js
deleted file mode 100644
index e9b075614..000000000
--- a/test/utils.js
+++ /dev/null
@@ -1,15 +0,0 @@
-var http = require('http'),
- concat = require('concat-stream');
-
-function get(url, callback) {
- http.get(url, function (res) {
- res.pipe(concat(function (text) {
- if (res.statusCode >= 400) {
- return callback(res.statusCode);
- }
- callback(text.toString());
- }));
- });
-}
-
-module.exports.get = get;
pFad - Phonifier reborn
Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.
Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.
Alternative Proxies:
Alternative Proxy
pFad Proxy
pFad v3 Proxy
pFad v4 Proxy