diff --git a/src/core-components/__tests__/button-test.js b/src/core-components/__tests__/button-test.js index 5e6154b5..0d5f14ba 100644 --- a/src/core-components/__tests__/button-test.js +++ b/src/core-components/__tests__/button-test.js @@ -3,33 +3,34 @@ jest.dontMock('../button.js'); import React from 'react/addons'; import Button from '../button.js'; -var TestUtils = React.addons.TestUtils; +let TestUtils = React.addons.TestUtils; -describe('Button', () => { - it('should render children', () => { - var button = TestUtils.renderIntoDocument( - - ); +describe('Button', function () { + it('should render children', function () { + let button = TestUtils.renderIntoDocument( + + ); - expect(button.getDOMNode().textContent).toEqual('testcontent'); - }); + expect(button.getDOMNode().textContent).toEqual('testcontent'); + }); - it('should add passed types to class', () => { - var types = [ - 'primary', + it('should add passed types to class', function () { + let types = [ + 'primary', 'clean', 'link' - ]; + ]; - types.forEach((type) => { - var button = TestUtils.renderIntoDocument( - - ); - expect(button.getDOMNode().getAttribute('class')).toContain('button-' + type); - }); - }); -}); \ No newline at end of file + types.forEach(function (type) { + let button = TestUtils.renderIntoDocument( + + ); + + expect(button.getDOMNode().getAttribute('class')).toContain('button-' + type); + }); + }); +}); diff --git a/src/core-components/__tests__/form-test.js b/src/core-components/__tests__/form-test.js index 83f6851b..3eda4d3d 100644 --- a/src/core-components/__tests__/form-test.js +++ b/src/core-components/__tests__/form-test.js @@ -5,10 +5,10 @@ import React from 'react/addons'; import Form from 'core-components/form.js'; import Input from 'core-components/input.js'; -var TestUtils = React.addons.TestUtils; +let TestUtils = React.addons.TestUtils; -describe('Form', () => { - var results = TestUtils.renderIntoDocument( +describe('Form', function () { + let results = TestUtils.renderIntoDocument(
@@ -17,9 +17,9 @@ describe('Form', () => { ); - var inputs = TestUtils.scryRenderedComponentsWithType(results, Input); + let inputs = TestUtils.scryRenderedComponentsWithType(results, Input); - it('should store input value in form state', () => { + it('should store input value in form state', function () { expect(results.state.form).toEqual({ first: 'value1', second: 'value2', @@ -27,7 +27,7 @@ describe('Form', () => { }); }); - it('should update form state if an input value changes', () => { + it('should update form state if an input value changes', function () { inputs[0].props.onChange({ target: {value: 'value4'}}); expect(results.state.form).toEqual({ @@ -37,7 +37,7 @@ describe('Form', () => { }); }); - it('should update input value if state value changes', () => { + it('should update input value if state value changes', function () { results.setState({ form: { first: 'value6', @@ -51,7 +51,7 @@ describe('Form', () => { expect(inputs[2].props.value).toEqual('value8'); }); - it('should call onSubmit callback when form is submitted', () => { + it('should call onSubmit callback when form is submitted', function () { TestUtils.Simulate.submit(results.getDOMNode()); expect(results.props.onSubmit).toBeCalledWith(results.state.form);