Skip to content

Commit afd6ea0

Browse files
author
Joachim Seminck
committed
Add another valid test case
1 parent 82facc8 commit afd6ea0

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

tests/lib/rules/no-typos.js

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -167,6 +167,20 @@ ruleTester.run('no-typos', rule, {
167167
'First["DEFAULT" + "PROPS"] = {};'
168168
].join('\n'),
169169
parserOptions: parserOptions
170+
}, {
171+
code: [ // This case is currently not supported
172+
'const propTypes = "PROPTYPES"',
173+
'const contextTypes = "CONTEXTTYPES"',
174+
'const childContextTypes = "CHILDCONTEXTTYPES"',
175+
'const defautProps = "DEFAULTPROPS"',
176+
'',
177+
'class First extends React.Component {}',
178+
'First[propTypes] = {};',
179+
'First[contextTypes] = {};',
180+
'First[childContextTypes] = {};',
181+
'First[defautProps] = {};'
182+
].join('\n'),
183+
parserOptions: parserOptions
170184
}],
171185

172186
invalid: [{

0 commit comments

Comments
 (0)