diff options
author | Francesco Cioria <firefelix@gmail.com> | 2017-06-19 17:57:16 +0200 |
---|---|---|
committer | Francesco Cioria <firefelix@gmail.com> | 2017-06-19 17:57:16 +0200 |
commit | 7bc70e312fecf2ec28d3e612e03f9a947b5d829e (patch) | |
tree | bc307d4aae66dbd004d42b7fe08e13d9f77b7dec /test | |
parent | 7514b71efaae897c97549c2a0f7254c91f8cd9cc (diff) | |
download | react-autosize-textarea-7bc70e312fecf2ec28d3e612e03f9a947b5d829e.zip react-autosize-textarea-7bc70e312fecf2ec28d3e612e03f9a947b5d829e.tar.gz react-autosize-textarea-7bc70e312fecf2ec28d3e612e03f9a947b5d829e.tar.bz2 |
fix lint errors in tests
Diffstat (limited to 'test')
-rw-r--r-- | test/.eslintrc | 5 | ||||
-rw-r--r-- | test/tests/TextareaAutosize-test.js | 12 |
2 files changed, 12 insertions, 5 deletions
diff --git a/test/.eslintrc b/test/.eslintrc new file mode 100644 index 0000000..55f121d --- /dev/null +++ b/test/.eslintrc @@ -0,0 +1,5 @@ +{ + "env": { + "jest": true + } +} diff --git a/test/tests/TextareaAutosize-test.js b/test/tests/TextareaAutosize-test.js index 968563e..2a62999 100644 --- a/test/tests/TextareaAutosize-test.js +++ b/test/tests/TextareaAutosize-test.js @@ -10,17 +10,19 @@ const renderTextarea = () => { return textarea; }; -describe('TextareaAutosize', function() { +describe('TextareaAutosize', () => { - it('should be displayed', function() { + it('should be displayed', () => { const textarea = renderTextarea(); const txt = TestUtils.scryRenderedDOMComponentsWithClass(textarea, 'textarea-autosize'); expect(txt.length).toBe(1, 'textarea is not displayed'); }); - it('should display initial value', function() { - const initialValue = 'Initial Value' - const component = <TextareaAutosize className='textarea-autosize' defaultValue={initialValue} />; + it('should display initial value', () => { + const initialValue = 'Initial Value'; + const component = ( + <TextareaAutosize className='textarea-autosize' defaultValue={initialValue} /> + ); const textarea = TestUtils.renderIntoDocument(component); const txt = TestUtils.findRenderedDOMComponentWithClass(textarea, 'textarea-autosize'); const value = txt.innerHTML; |