Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Add testcase
  • Loading branch information
ota-meshi committed Apr 24, 2019
1 parent d8b9206 commit 57267ca
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions __tests__/no-return-wrap.js
Expand Up @@ -202,6 +202,18 @@ ruleTester.run('no-return-wrap', rule, {
{
code: 'doThing().then(() => { return Promise.resolve(4) })',
errors: [{ message: resolveMessage }]
},

// issue #150
{
code: `
function a () {
return p.then(function(val) {
return Promise.resolve(val * 4)
})
}
`,
errors: [{ message: resolveMessage }]
}
]
})

0 comments on commit 57267ca

Please sign in to comment.