Skip to content

armgit / mocha

Public Imported from GitHub
0

☕️ Classic, reliable, trusted test framework for Node.js and the browser

docs: fix return jsdoc type of `titlePath` (#4886)

Feng Yueca4fec9eee1
diff --git a/lib/runnable.js b/lib/runnable.js
index fef49410..5e0970b1 100644
--- a/lib/runnable.js
+++ b/lib/runnable.js
@@ -211,7 +211,7 @@ Runnable.prototype.fullTitle = function () {
*
* @memberof Mocha.Runnable
* @public
- * @return {string}
+ * @return {string[]}
*/
Runnable.prototype.titlePath = function () {
return this.parent.titlePath().concat([this.title]);
diff --git a/lib/suite.js b/lib/suite.js
index 43cb7556..64d7183f 100644
--- a/lib/suite.js
+++ b/lib/suite.js
@@ -387,7 +387,7 @@ Suite.prototype.fullTitle = function () {
*
* @memberof Suite
* @public
- * @return {string}
+ * @return {string[]}
*/
Suite.prototype.titlePath = function () {
var result = [];