Browse files

Remove React section from browser testing recipe (#1528)

Fixes #1522.
  • Loading branch information...
lukechilds authored and kevva committed Sep 23, 2017
1 parent 03149d7 commit 14238788c421fdfcc8e1a67c4191fd4c6f3e2385
Showing with 2 additions and 26 deletions.
  1. +2 −26 docs/recipes/
@@ -2,8 +2,7 @@
Translations: [Español](, [Français](, [Italiano](, [Русский](, [简体中文](
AVA does not support running tests in browsers [yet]( Some libraries require browser specific globals (`window`, `document`, `navigator`, etc).
An example of this is React, at least if you want to use ReactDOM.render and simulate events with ReactTestUtils.
AVA does not support running tests in browsers [yet]( However JavaScript libraries that require browser specific globals (`window`, `document`, `navigator`, etc) can still be tested with AVA by mocking these globals.
This recipe works for any library that needs a mocked browser environment.
@@ -59,7 +58,7 @@ Configure AVA to `require` the helper before every test file.
Write your tests and enjoy a mocked browser environment.
import test from 'ava';
@@ -71,26 +70,3 @@ test('Insert to DOM', t => {'div'), div);
import test from 'ava';
import React from 'react';
import {render} from 'react-dom';
import {Simulate} from 'react-addons-test-utils';
import sinon from 'sinon';
import CustomInput from './components/custom-input.jsx';
test('Input calls onBlur', t => {
const onUserBlur = sinon.spy();
const input = render(
React.createElement(CustomInput, onUserBlur),

0 comments on commit 1423878

Please sign in to comment.