A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/testing-library/react-testing-library/issues/169 below:

Mixing custom render with all other exports gives error · Issue #169 · testing-library/react-testing-library · GitHub

Using the custom utils file as described in the README where you re-export everything from react-testing-library and override the render method gives the following error:

TypeError: Cannot set property render of [object Object] which has only a getter

Relevant code or config:
// @flow
import * as React from 'react';
import { render } from 'react-testing-library';

const customRender = (node, ...options) => {
  return render(
    <div>{node}</div>,
    ...options,
  );
};

export * from 'react-testing-library';

export { customRender as render };

This is on create-react-app by the way (react-scripts@1.1.5)

chancesmith, ChristienGuy, konekoya, arnaudoisel, brendonco and 6 more


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4