diff --git a/package.json b/package.json index 4123003..e0cb7e1 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "react-open-weather", "bin": {}, - "version": "0.5.0", + "version": "0.5.1", "description": "React Weather component", "main": "lib/js/ReactWeather.js", "dependencies": { diff --git a/test/ReactWeather.spec.js b/test/ReactWeather.spec.js index c8a3da1..d642996 100644 --- a/test/ReactWeather.spec.js +++ b/test/ReactWeather.spec.js @@ -8,12 +8,14 @@ import { mappedForecastData } from './fixtures/forecastdata'; describe('ReactWeather Component Shallow', () => { let wrapper; beforeEach(() => { - wrapper = mount(); + wrapper = mount( + + ); wrapper.setState({ data: mappedForecastData }); }); it('should render the component', () => { @@ -35,19 +37,29 @@ describe('ReactWeather Component Shallow', () => { /* global mount, spy */ describe('ReactWeather Component Render', () => { it('should accept the props and ggenerate params object', () => { - const wrapper = mount(); - expect(wrapper.instance()._getParams()).to.deep.equal({ q: 'Munich', lang: 'en' }); + const wrapper = mount( + + ); + expect(wrapper.instance()._getParams()).to.deep.equal({ + q: 'Munich', + lang: 'en', + }); }); it('calls componentDidMount', () => { spy(ReactWeather.prototype, 'componentDidMount'); - mount(); + mount(); expect(ReactWeather.prototype.componentDidMount.calledOnce).to.equal(true); }); it('have default props', () => { - const wrapper = mount(); + const wrapper = mount(); expect(wrapper.props().unit).to.equal('metric'); expect(wrapper.props().forecast).to.equal('today'); - expect(wrapper.props().type).to.equal('auto'); + expect(wrapper.props().type).to.equal('city'); expect(wrapper.props().lang).to.equal('en'); }); });