Skip to content

Commit

Permalink
test: check that new update fixes #747; fixes #747, fixes #748, fixes #…
Browse files Browse the repository at this point in the history
  • Loading branch information
brettz9 committed Jun 1, 2021
1 parent 1745fca commit 318e104
Showing 1 changed file with 45 additions and 0 deletions.
45 changes: 45 additions & 0 deletions test/rules/assertions/noUndefinedTypes.js
Original file line number Diff line number Diff line change
Expand Up @@ -1025,5 +1025,50 @@ export default {
},
},
},
{
// https://github.com/gajus/eslint-plugin-jsdoc/issues/747
code: `
/**
* Read all content from a Readable stream.
*
* @param {!module:stream.Readable} readable Readable stream.
* @returns {!Promise<!Array<*>>} Content from readable.
*/
module.exports =
function readStream(readable) {
return new Promise((resolve, reject) => {
const data = [];
readable
.on('data', (d) => data.push(d))
.once('error', reject)
.once('end', () => resolve(data));
});
};
`,
env: {es6: true},
ignoreReadme: true,
},
{
// https://github.com/gajus/eslint-plugin-jsdoc/issues/749
code: `
/**
* @param {{message: string|undefined}} options Options.
*/
function MyError(options) {
}
`,
ignoreReadme: true,
},
{
// https://github.com/gajus/eslint-plugin-jsdoc/issues/748
code: `
/**
* @param {{message: string?}} options Options.
*/
function MyError(options) {
}
`,
ignoreReadme: true,
},
],
};

0 comments on commit 318e104

Please sign in to comment.