Skip to content

Commit abbf77e

Browse files
committed
Add an invalid test case for incorrect @template type
1 parent cfab39c commit abbf77e

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

test/rules/assertions/noUndefinedTypes.js

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -155,6 +155,22 @@ export default {
155155
}
156156
}
157157
},
158+
{
159+
code: `
160+
/**
161+
* @template TEMPLATE_TYPE
162+
* @param {WRONG_TEMPLATE_TYPE} bar
163+
*/
164+
function foo (bar) {
165+
};
166+
`,
167+
errors: [
168+
{
169+
line: 4,
170+
message: 'The type \'WRONG_TEMPLATE_TYPE\' is undefined.'
171+
}
172+
]
173+
},
158174
{
159175
code: `
160176
class Foo {

0 commit comments

Comments
 (0)