From 06f436a0c3ccfc44d335689a18efc7624f3357b3 Mon Sep 17 00:00:00 2001 From: Alexander Christiansson Date: Wed, 4 May 2016 11:00:30 +0200 Subject: [PATCH] Import describe and it from global scope instead of mocha Watch mode breaks otherwise. See https://github.com/mochajs/mocha/issues/956. --- test/insertCssSpec.js | 3 ++- test/withStylesSpec.js | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/test/insertCssSpec.js b/test/insertCssSpec.js index 58cc61a1..9a61e8db 100644 --- a/test/insertCssSpec.js +++ b/test/insertCssSpec.js @@ -8,10 +8,11 @@ */ import jsdom from 'jsdom'; -import { describe, it } from 'mocha'; import { expect } from 'chai'; import insertCss from '../src/insertCss'; +const { describe, it } = global; + global.document = jsdom.jsdom(''); global.window = document.parentWindow; diff --git a/test/withStylesSpec.js b/test/withStylesSpec.js index 4cc6a467..53c8c9fd 100644 --- a/test/withStylesSpec.js +++ b/test/withStylesSpec.js @@ -9,11 +9,11 @@ /* eslint-disable react/prefer-stateless-function */ -import { describe, it } from 'mocha'; import { expect } from 'chai'; import React, { createClass, Component } from 'react'; import withStyles from '../src/withStyles'; +const { describe, it } = global; describe('withStyles(ComposedComponent, ...styles)', () => { class Passthrough extends Component {