Skip to content

Commit

Permalink
Updated .eslintrc and Mocha tests #50 (#51)
Browse files Browse the repository at this point in the history
Closes #50
  • Loading branch information
sthzg authored Aug 15, 2016
1 parent bec5ab5 commit 07bfcf8
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 13 deletions.
8 changes: 7 additions & 1 deletion test/.eslintrc
Original file line number Diff line number Diff line change
@@ -1,8 +1,14 @@
{
"env": {
"mocha": true
},
"globals": {
"expect": true
},
"rules": {
"import/no-extraneous-dependencies": 0
"import/no-extraneous-dependencies": 0,
"prefer-arrow-callback": 0,
"func-names": 0,
"strict": 0
}
}
13 changes: 6 additions & 7 deletions test/components/AppTest.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,16 @@ import React from 'react';
import { shallow } from 'enzyme';
import App from 'components/App';

describe('<App />', () => {
describe('<App />', function () {

let component;
beforeEach(() => {
component = shallow(<App />);
beforeEach(function () {
this.component = shallow(<App />);
});

describe('when rendering the component', () => {
describe('when rendering the component', function () {

it('should have a className of "index"', () => {
expect(component.hasClass('index')).to.equal(true);
it('should have a className of "index"', function () {
expect(this.component.hasClass('index')).to.equal(true);
});
});
});
5 changes: 2 additions & 3 deletions test/components/YeomanImageTest.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,9 @@ import React from 'react';
import { shallow } from 'enzyme';
import YeomanImage from 'components/YeomanImage';

describe('<YeomanImage />', () => {

it('should render an image tag', () => {
describe('<YeomanImage />', function () {

it('should render an image tag', function () {
const component = shallow(<YeomanImage />);
expect(component.find('img').length).to.equal(1);
});
Expand Down
4 changes: 2 additions & 2 deletions test/config/ConfigTest.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import config from 'config';

describe('Application Environment', () => {
describe('Application Environment', function () {

it('should load app config file depending on current --env', () => {
it('should load app config file depending on current --env', function () {
expect(config.appEnv).to.equal('test');
});
});

0 comments on commit 07bfcf8

Please sign in to comment.