Skip to content

Commit feb068a

Browse files
committed
Rewrite react-in-jsx-scope tests with template literals
1 parent 8681c92 commit feb068a

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

tests/lib/rules/react-in-jsx-scope.js

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -42,17 +42,17 @@ ruleTester.run('react-in-jsx-scope', rule, {
4242
{code: 'var React, App; <App />;'},
4343
{code: '/** @jsx Foo */ var Foo, App; <App />;'},
4444
{code: '/** @jsx Foo.Bar */ var Foo, App; <App />;'},
45-
{code: [
46-
'import React from \'react/addons\';',
47-
'const Button = createReactClass({',
48-
' render() {',
49-
' return (',
50-
' <button {...this.props}>{this.props.children}</button>',
51-
' )',
52-
' }',
53-
'});',
54-
'export default Button;'
55-
].join('\n')},
45+
{code: `
46+
import React from 'react/addons';
47+
const Button = createReactClass({
48+
render() {
49+
return (
50+
<button {...this.props}>{this.props.children}</button>
51+
)
52+
}
53+
});
54+
export default Button;
55+
`},
5656
{code: 'var Foo, App; <App />;', settings: settings}
5757
],
5858
invalid: [{

0 commit comments

Comments
 (0)