From 864baca9ac380c37610fc97a713f7d51de58e7b4 Mon Sep 17 00:00:00 2001 From: Stephan Herzog Date: Mon, 15 Aug 2016 11:08:25 +0200 Subject: [PATCH] Refactored V1 tests to use inline function #52 (#53) --- test/components/MainTest.js | 11 +++++------ test/config/ConfigTest.js | 4 ++-- 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/test/components/MainTest.js b/test/components/MainTest.js index a56889e..a82f2af 100644 --- a/test/components/MainTest.js +++ b/test/components/MainTest.js @@ -10,14 +10,13 @@ import createComponent from 'helpers/shallowRenderHelper'; import Main from 'components/Main'; -describe('MainComponent', () => { - let MainComponent; +describe('MainComponent', function () { - beforeEach(() => { - MainComponent = createComponent(Main); + beforeEach(function () { + this.MainComponent = createComponent(Main); }); - it('should have its component name as default className', () => { - expect(MainComponent.props.className).to.equal('index'); + it('should have its component name as default className', function () { + expect(this.MainComponent.props.className).to.equal('index'); }); }); diff --git a/test/config/ConfigTest.js b/test/config/ConfigTest.js index 7c9d35b..20a11d0 100644 --- a/test/config/ConfigTest.js +++ b/test/config/ConfigTest.js @@ -5,8 +5,8 @@ import config from 'config'; -describe('appEnvConfigTests', () => { - it('should load app config file depending on current --env', () => { +describe('appEnvConfigTests', function () { + it('should load app config file depending on current --env', function () { expect(config.appEnv).to.equal('test'); }); });