@@ -33,12 +33,12 @@ describe('CollapsibleMixin', function () {
});
afterEach(()=> {
- if (console.warn.calledWithMatch('CollapsibleMixin is deprecated')){
+ if (console.warn.calledWithMatch('CollapsibleMixin is deprecated')) {
console.warn.reset();
}
});
- describe('getInitialState', function(){
+ describe('getInitialState', function() {
it('Should check defaultExpanded', function () {
instance = ReactTestUtils.renderIntoDocument(
Panel content
@@ -56,7 +56,7 @@ describe('CollapsibleMixin', function () {
});
});
- describe('collapsed', function(){
+ describe('collapsed', function() {
it('Should have collapse class', function () {
instance = ReactTestUtils.renderIntoDocument(
Panel content
@@ -65,8 +65,8 @@ describe('CollapsibleMixin', function () {
});
});
- describe('from collapsed to expanded', function(){
- beforeEach(function(){
+ describe('from collapsed to expanded', function() {
+ beforeEach(function() {
instance = ReactTestUtils.renderIntoDocument(
Panel content
);
@@ -82,7 +82,7 @@ describe('CollapsibleMixin', function () {
let node = instance.getCollapsibleDOMNode();
assert.equal(node.style.height, '');
- instance._afterWillUpdate = function(){
+ instance._afterWillUpdate = function() {
assert.equal(node.style.height, '0px');
};
@@ -98,8 +98,8 @@ describe('CollapsibleMixin', function () {
});
it('Should transition from collapsing to not collapsing', function (done) {
- instance._addEndEventListener = function(node, complete){
- setTimeout(function(){
+ instance._addEndEventListener = function(node, complete) {
+ setTimeout(function() {
complete();
assert.ok(!instance.state.collapsing);
done();
@@ -112,8 +112,8 @@ describe('CollapsibleMixin', function () {
it('Should clear height after transition complete', function (done) {
let node = instance.getCollapsibleDOMNode();
- instance._addEndEventListener = function(nodeInner, complete){
- setTimeout(function(){
+ instance._addEndEventListener = function(nodeInner, complete) {
+ setTimeout(function() {
complete();
assert.equal(nodeInner.style.height, '');
done();
@@ -126,8 +126,8 @@ describe('CollapsibleMixin', function () {
});
});
- describe('from expanded to collapsed', function(){
- beforeEach(function(){
+ describe('from expanded to collapsed', function() {
+ beforeEach(function() {
instance = ReactTestUtils.renderIntoDocument(
Panel content
);
@@ -142,7 +142,7 @@ describe('CollapsibleMixin', function () {
it('Should set initial height', function () {
let node = instance.getCollapsibleDOMNode();
- instance._afterWillUpdate = function(){
+ instance._afterWillUpdate = function() {
assert.equal(node.style.height, '15px');
};
@@ -159,8 +159,8 @@ describe('CollapsibleMixin', function () {
});
it('Should transition from collapsing to not collapsing', function (done) {
- instance._addEndEventListener = function(node, complete){
- setTimeout(function(){
+ instance._addEndEventListener = function(node, complete) {
+ setTimeout(function() {
complete();
assert.ok(!instance.state.collapsing);
done();
@@ -173,8 +173,8 @@ describe('CollapsibleMixin', function () {
it('Should have 0px height after transition complete', function (done) {
let node = instance.getCollapsibleDOMNode();
- instance._addEndEventListener = function(nodeInner, complete){
- setTimeout(function(){
+ instance._addEndEventListener = function(nodeInner, complete) {
+ setTimeout(function() {
complete();
assert.ok(nodeInner.style.height === '0px');
done();
@@ -187,7 +187,7 @@ describe('CollapsibleMixin', function () {
});
});
- describe('expanded', function(){
+ describe('expanded', function() {
it('Should have collapse and in class', function () {
instance = ReactTestUtils.renderIntoDocument(
Panel content
@@ -203,19 +203,19 @@ describe('CollapsibleMixin', function () {
});
});
- describe('dimension', function(){
- beforeEach(function(){
+ describe('dimension', function() {
+ beforeEach(function() {
instance = ReactTestUtils.renderIntoDocument(
Panel content
);
});
- it('Defaults to height', function(){
+ it('Defaults to height', function() {
assert.equal(instance.dimension(), 'height');
});
- it('Uses getCollapsibleDimension if exists', function(){
- instance.getCollapsibleDimension = function(){
+ it('Uses getCollapsibleDimension if exists', function() {
+ instance.getCollapsibleDimension = function() {
return 'whatevs';
};
assert.equal(instance.dimension(), 'whatevs');
diff --git a/test/DropdownSpec.js b/test/DropdownSpec.js
index db1efb64b2..91cf2f17bd 100644
--- a/test/DropdownSpec.js
+++ b/test/DropdownSpec.js
@@ -278,7 +278,7 @@ describe('Dropdown', function() {
{}}
+ onToggle={() => {}}
title='Prop open control'
id='test-id'
>
diff --git a/test/FadeMixinSpec.js b/test/FadeMixinSpec.js
index 7e6086dd0f..471efc671d 100644
--- a/test/FadeMixinSpec.js
+++ b/test/FadeMixinSpec.js
@@ -20,7 +20,7 @@ describe('FadeMixin', function () {
});
afterEach(()=> {
- if (console.warn.calledWithMatch('FadeMixin is deprecated')){
+ if (console.warn.calledWithMatch('FadeMixin is deprecated')) {
console.warn.reset();
}
});
@@ -31,7 +31,7 @@ describe('FadeMixin', function () {
let child = ReactTestUtils.findRenderedDOMComponentWithTag(instance, 'span');
- setTimeout(function(){
+ setTimeout(function() {
assert.ok(React.findDOMNode(instance).className.match(/\bin\b/));
assert.ok(React.findDOMNode(instance).className.match(/\bfade\b/));
assert.ok(React.findDOMNode(child).className.match(/\bin\b/));
@@ -43,7 +43,7 @@ describe('FadeMixin', function () {
it('Should remove the in class for all elements', function (done) {
let instance = ReactTestUtils.renderIntoDocument();
- setTimeout(function(){
+ setTimeout(function() {
instance.componentWillUnmount();
let element = instance._fadeOutEl.children[0];
@@ -52,7 +52,7 @@ describe('FadeMixin', function () {
assert.ok(element.className.match(/\bin\b/));
assert.ok(child.className.match(/\bin\b/));
- setTimeout(function(){
+ setTimeout(function() {
assert.ok(!element.className.match(/\bin\b/));
assert.ok(element.className.match(/\bfade\b/));
assert.ok(!child.className.match(/\bin\b/));
diff --git a/test/FadeSpec.js b/test/FadeSpec.js
index 0f85fdfd40..c6217c3f6c 100644
--- a/test/FadeSpec.js
+++ b/test/FadeSpec.js
@@ -6,10 +6,10 @@ describe('Fade', function () {
let Component, instance;
- beforeEach(function(){
+ beforeEach(function() {
Component = React.createClass({
- render(){
+ render() {
let { children, ...props } = this.props;
return (
@@ -52,7 +52,7 @@ describe('Fade', function () {
Panel content
);
- function onEntering(){
+ function onEntering() {
assert.equal(React.findDOMNode(instance).className, 'fade in');
done();
}
@@ -68,7 +68,7 @@ describe('Fade', function () {
Panel content
);
- function onExiting(){
+ function onExiting() {
assert.equal(React.findDOMNode(instance).className, 'fade');
done();
}
diff --git a/test/MenuItemSpec.js b/test/MenuItemSpec.js
index f1c5c0f223..4dca3af484 100644
--- a/test/MenuItemSpec.js
+++ b/test/MenuItemSpec.js
@@ -80,7 +80,7 @@ describe('MenuItem', function() {
});
it('does not fire onSelect when divider is clicked', function() {
- const handleSelect = (event, selectedEvent) => {
+ const handleSelect = () => {
throw new Error('Should not invoke onSelect with divider flag applied');
};
const instance = ReactTestUtils.renderIntoDocument(
@@ -93,7 +93,7 @@ describe('MenuItem', function() {
});
it('does not fire onSelect when header is clicked', function() {
- const handleSelect = (event, selectedEvent) => {
+ const handleSelect = () => {
throw new Error('Should not invoke onSelect with divider flag applied');
};
const instance = ReactTestUtils.renderIntoDocument(
@@ -106,7 +106,7 @@ describe('MenuItem', function() {
});
it('disabled link', function() {
- const handleSelect = (event, selectEvent) => {
+ const handleSelect = () => {
throw new Error('Should not invoke onSelect event');
};
const instance = ReactTestUtils.renderIntoDocument(
diff --git a/test/ModalSpec.js b/test/ModalSpec.js
index 9d5ceb0178..aab9fd9db1 100644
--- a/test/ModalSpec.js
+++ b/test/ModalSpec.js
@@ -6,7 +6,7 @@ import { render, shouldWarn } from './helpers';
describe('Modal', function () {
let mountPoint;
- beforeEach(()=>{
+ beforeEach(() => {
mountPoint = document.createElement('div');
document.body.appendChild(mountPoint);
});
@@ -65,7 +65,7 @@ describe('Modal', function () {
ReactTestUtils.Simulate.click(backdrop);
- setTimeout(function(){
+ setTimeout(function() {
assert.equal(React.findDOMNode(instance).className.length, 0);
done();
}, 0);
@@ -203,7 +203,7 @@ describe('Modal', function () {
let noOp = function () {};
class CustomDialog {
- render(){ return ; }
+ render() { return ; }
}
let instance = render(
@@ -221,7 +221,7 @@ describe('Modal', function () {
let instance = render(
{}}
+ onHide={() => {}}
onExit={increment}
onExiting={increment}
onExited={()=> {
@@ -260,7 +260,7 @@ describe('Modal', function () {
describe('Focused state', function () {
let focusableContainer = null;
- beforeEach(()=>{
+ beforeEach(() => {
focusableContainer = document.createElement('div');
focusableContainer.tabIndex = 0;
document.body.appendChild(focusableContainer);
@@ -277,7 +277,7 @@ describe('Modal', function () {
document.activeElement.should.equal(focusableContainer);
let instance = render(
- {}} animation={false}>
+ {}} animation={false}>
Message
, focusableContainer);
@@ -292,7 +292,7 @@ describe('Modal', function () {
it('Should not focus on the Modal when autoFocus is false', function () {
render(
- {}} animation={false}>
+ {}} animation={false}>
Message
, focusableContainer);
@@ -305,7 +305,7 @@ describe('Modal', function () {
document.activeElement.should.equal(focusableContainer);
render(
- {}} animation={false}>
+ {}} animation={false}>
, focusableContainer);
diff --git a/test/NavDropdownSpec.js b/test/NavDropdownSpec.js
index e70ec453cc..b30bdbdd87 100644
--- a/test/NavDropdownSpec.js
+++ b/test/NavDropdownSpec.js
@@ -42,7 +42,7 @@ describe('NavDropdown', function() {
{}}
+ onToggle={() => {}}
title='Prop open control'
id='test-id'>
diff --git a/test/NavItemSpec.js b/test/NavItemSpec.js
index a7f6ffb6a1..6e665be08c 100644
--- a/test/NavItemSpec.js
+++ b/test/NavItemSpec.js
@@ -107,7 +107,7 @@ describe('NavItem', function () {
assert.equal(linkElement.outerHTML.match('role="button"'), null);
});
- describe('Web Accessibility', function(){
+ describe('Web Accessibility', function() {
it('Should pass aria-controls to the link', function () {
let instance = ReactTestUtils.renderIntoDocument(
diff --git a/test/NavSpec.js b/test/NavSpec.js
index a86f47e0dc..d1d94cb03f 100644
--- a/test/NavSpec.js
+++ b/test/NavSpec.js
@@ -178,7 +178,7 @@ describe('Nav', function () {
});
- describe('Web Accessibility', function(){
+ describe('Web Accessibility', function() {
it('Should have tablist and tab roles', function () {
let instance = ReactTestUtils.renderIntoDocument(
diff --git a/test/OverlayDeprecationSpec.js b/test/OverlayDeprecationSpec.js
index c8eb2f03f7..abcbdc998b 100644
--- a/test/OverlayDeprecationSpec.js
+++ b/test/OverlayDeprecationSpec.js
@@ -6,21 +6,21 @@ import Portal from '../src/Portal';
import { shouldWarn } from './helpers';
-describe('Components moved to react-overlays', ()=>{
+describe('Components moved to react-overlays', () => {
- it('should warn about Position', ()=>{
+ it('should warn about Position', () => {
ReactTestUtils.renderIntoDocument();
shouldWarn(/Position component is deprecated/);
});
- it('should warn about Transition', ()=>{
+ it('should warn about Transition', () => {
ReactTestUtils.renderIntoDocument();
shouldWarn(/Transition component is deprecated/);
});
- it('should warn about Portal', ()=>{
+ it('should warn about Portal', () => {
ReactTestUtils.renderIntoDocument();
shouldWarn(/Portal component is deprecated/);
diff --git a/test/OverlayTriggerSpec.js b/test/OverlayTriggerSpec.js
index c50e73dc38..960d6322a0 100644
--- a/test/OverlayTriggerSpec.js
+++ b/test/OverlayTriggerSpec.js
@@ -80,7 +80,7 @@ describe('OverlayTrigger', function() {
test }
- onHide={()=>{}}
+ onHide={() => {}}
onExit={increment}
onExiting={increment}
onExited={()=> {
diff --git a/test/PanelSpec.js b/test/PanelSpec.js
index 0c9cfc09f1..ff1b9daf30 100644
--- a/test/PanelSpec.js
+++ b/test/PanelSpec.js
@@ -185,7 +185,7 @@ describe('Panel', function () {
assert.notOk(children[0].className.match(/\bpanel-body\b/));
});
- describe('Web Accessibility', function(){
+ describe('Web Accessibility', function() {
it('Should be aria-expanded=true', function () {
let instance = ReactTestUtils.renderIntoDocument(
diff --git a/test/SafeAnchorSpec.js b/test/SafeAnchorSpec.js
index 2271c2fbbe..2b5bf8487f 100644
--- a/test/SafeAnchorSpec.js
+++ b/test/SafeAnchorSpec.js
@@ -32,7 +32,7 @@ describe('SafeAnchor', function() {
});
it('forwards onClick handler', function(done) {
- const handleClick = (event) => {
+ const handleClick = () => {
done();
};
const instance = ReactTestUtils.renderIntoDocument(