Skip to content

Commit

Permalink
Fix esdoc returns to return (#42)
Browse files Browse the repository at this point in the history
  • Loading branch information
heavenshell authored Apr 25, 2020
1 parent 23f6429 commit e0cc033
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 10 deletions.
12 changes: 3 additions & 9 deletions src/formatters/esdoc.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -155,13 +155,7 @@ describe('esdoc', () => {
}
const doc = generateFunctionDoc(params)
const docs = doc.split('\n')
expect(docs).toEqual([
'/**',
' * foo.',
' *',
' * @returns {string}',
' */',
])
expect(docs).toEqual(['/**', ' * foo.', ' *', ' * @return {string}', ' */'])
})

it('generateFunctionDoc with param', () => {
Expand Down Expand Up @@ -252,7 +246,7 @@ describe('esdoc', () => {
' *',
' * @param {string} arg1',
' * @param {number} arg2',
' * @returns {number}',
' * @return {number}',
' */',
])
})
Expand All @@ -279,7 +273,7 @@ describe('esdoc', () => {
' * foo.',
' *',
' * @param {{ arg1: string }} arg1',
' * @returns {number}',
' * @return {number}',
' */',
])
})
Expand Down
2 changes: 1 addition & 1 deletion src/formatters/esdoc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ module.exports = {

const end = doc.returnType
? `
* @returns {${doc.returnType}}
* @return {${doc.returnType}}
*/`
: `
*/`
Expand Down

0 comments on commit e0cc033

Please sign in to comment.