From afd6ea0d18cdd3b70ee4e1087bce74b2143c762b Mon Sep 17 00:00:00 2001 From: Joachim Seminck Date: Sat, 1 Jul 2017 09:33:22 +0200 Subject: [PATCH] Add another valid test case --- tests/lib/rules/no-typos.js | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/tests/lib/rules/no-typos.js b/tests/lib/rules/no-typos.js index de29f92a92..7883352453 100644 --- a/tests/lib/rules/no-typos.js +++ b/tests/lib/rules/no-typos.js @@ -167,6 +167,20 @@ ruleTester.run('no-typos', rule, { 'First["DEFAULT" + "PROPS"] = {};' ].join('\n'), parserOptions: parserOptions + }, { + code: [ // This case is currently not supported + 'const propTypes = "PROPTYPES"', + 'const contextTypes = "CONTEXTTYPES"', + 'const childContextTypes = "CHILDCONTEXTTYPES"', + 'const defautProps = "DEFAULTPROPS"', + '', + 'class First extends React.Component {}', + 'First[propTypes] = {};', + 'First[contextTypes] = {};', + 'First[childContextTypes] = {};', + 'First[defautProps] = {};' + ].join('\n'), + parserOptions: parserOptions }], invalid: [{