From 975160ad38bdc41ed254fdf10d0839546f92d666 Mon Sep 17 00:00:00 2001 From: Nate Piche Date: Mon, 18 Jan 2016 20:57:58 -0500 Subject: [PATCH] address review feedback --- .gitignore | 3 --- package.json | 4 ++-- src/__tests__/ReactWrapper-spec.js | 2 +- src/__tests__/Utils-spec.js | 4 +--- src/__tests__/describeWithDOM/describeWithDOMOnly-spec.js | 2 +- src/__tests__/describeWithDOM/describeWithDOMSkip-spec.js | 4 ++-- src/index.js | 2 ++ 7 files changed, 9 insertions(+), 12 deletions(-) diff --git a/.gitignore b/.gitignore index c8b1692f2..84884bb93 100644 --- a/.gitignore +++ b/.gitignore @@ -29,8 +29,5 @@ node_modules # Jetbrains IDEs .idea -# vim swp files -*.swp - /build _book diff --git a/package.json b/package.json index d6bedafe1..5c30361ae 100644 --- a/package.json +++ b/package.json @@ -14,8 +14,8 @@ "check": "npm run lint && npm run test:all", "build": "babel src --out-dir build", "test:watch": "mocha --compilers js:babel/register --recursive src/**/__tests__/*.js --watch", - "test:describeWithDOMOnly": "mocha --compilers js:babel/register --recursive src/**/__tests__/describeWithDOM/describeWithDOMOnly-spec.js", - "test:describeWithDOMSkip": "mocha --compilers js:babel/register --recursive src/**/__tests__/describeWithDOM/describeWithDOMSkip-spec.js", + "test:describeWithDOMOnly": "mocha --compilers js:babel/register --recursive src/**/__tests__/describeWithDOM/describeWithDOMOnly-spec.js", + "test:describeWithDOMSkip": "mocha --compilers js:babel/register --recursive src/**/__tests__/describeWithDOM/describeWithDOMSkip-spec.js", "test:all": "npm run react:13 && npm test && npm run test:describeWithDOMOnly && npm run test:describeWithDOMSkip && npm run react:14 && npm test && npm run test:describeWithDOMOnly && npm run test:describeWithDOMSkip", "react:clean": "rimraf node_modules/react node_modules/react-dom node_modules/react-addons-test-utils", "react:13": "npm run react:clean && npm i react@0.13", diff --git a/src/__tests__/ReactWrapper-spec.js b/src/__tests__/ReactWrapper-spec.js index 168957a05..10efa5d2b 100644 --- a/src/__tests__/ReactWrapper-spec.js +++ b/src/__tests__/ReactWrapper-spec.js @@ -5,8 +5,8 @@ import { mount, render, ReactWrapper, + describeWithDOM, } from '../'; -import { describeWithDOM } from '../describeWithDOM'; import { describeIf } from './_helpers'; import { REACT013 } from '../version'; diff --git a/src/__tests__/Utils-spec.js b/src/__tests__/Utils-spec.js index fddec7ac3..49a9513b8 100644 --- a/src/__tests__/Utils-spec.js +++ b/src/__tests__/Utils-spec.js @@ -13,11 +13,9 @@ import { mapNativeEventNames, } from '../Utils'; import { + describeWithDOM, mount, } from '../'; -import { - describeWithDOM, -} from '../describeWithDOM'; describe('Utils', () => { diff --git a/src/__tests__/describeWithDOM/describeWithDOMOnly-spec.js b/src/__tests__/describeWithDOM/describeWithDOMOnly-spec.js index b54e0b83e..10a375bf2 100644 --- a/src/__tests__/describeWithDOM/describeWithDOMOnly-spec.js +++ b/src/__tests__/describeWithDOM/describeWithDOMOnly-spec.js @@ -1,5 +1,5 @@ import { expect } from 'chai'; -import { describeWithDOM } from '../../describeWithDOM'; +import { describeWithDOM } from '../..'; describe('describeWithDOM', () => { describe('.only()', () => { diff --git a/src/__tests__/describeWithDOM/describeWithDOMSkip-spec.js b/src/__tests__/describeWithDOM/describeWithDOMSkip-spec.js index 7c348700f..6c4738fdc 100644 --- a/src/__tests__/describeWithDOM/describeWithDOMSkip-spec.js +++ b/src/__tests__/describeWithDOM/describeWithDOMSkip-spec.js @@ -1,11 +1,11 @@ import { expect } from 'chai'; -import { describeWithDOM } from '../../describeWithDOM'; +import { describeWithDOM } from '../..'; describe('describeWithDOM', () => { describe('.skip()', () => { describeWithDOM.skip('will skip tests called with skip', () => { it('will not run this test', () => { - // purposefully failing test that won't be run + // purposefully failing test that won't be run expect(true).to.equal(false); }); }); diff --git a/src/index.js b/src/index.js index 3e0c5c68f..8e9e261d5 100644 --- a/src/index.js +++ b/src/index.js @@ -2,6 +2,7 @@ import cheerio from 'cheerio'; import Sinon from 'sinon'; import ReactWrapper from './ReactWrapper'; import ShallowWrapper from './ShallowWrapper'; +import { describeWithDOM } from './describeWithDOM'; import { onPrototype } from './Utils'; import { renderToStaticMarkup } from './react-compat'; @@ -86,3 +87,4 @@ export function render(node) { export { ShallowWrapper as ShallowWrapper }; export { ReactWrapper as ReactWrapper }; +export { describeWithDOM as describeWithDOM };