File tree Expand file tree Collapse file tree 5 files changed +14
-12
lines changed
Expand file tree Collapse file tree 5 files changed +14
-12
lines changed Original file line number Diff line number Diff line change 1- import React , { PureComponent } from 'react ' ;
1+ import React , { PureComponent } from 'preact-compat ' ;
22import PropTypes from 'prop-types' ;
33import Template from '../Template.js' ;
44import autoHideContainerHOC from '../../decorators/autoHideContainer.js' ;
Original file line number Diff line number Diff line change 1- import React , { Component } from 'react ' ;
1+ import React , { Component } from 'preact-compat ' ;
22import PropTypes from 'prop-types' ;
33import autoHideContainerHOC from '../../decorators/autoHideContainer.js' ;
44import headerFooterHOC from '../../decorators/headerFooter.js' ;
Original file line number Diff line number Diff line change 1- import React from 'react' ;
2- import ReactDOM from 'react-dom' ;
1+ import React , { render } from 'preact-compat' ;
32import cx from 'classnames' ;
43
54import Breadcrumb from '../../components/Breadcrumb/Breadcrumb' ;
@@ -38,7 +37,7 @@ const renderer = ({
3837
3938 const shouldAutoHideContainer = autoHideContainer && ! canRefine ;
4039
41- ReactDOM . render (
40+ render (
4241 < Breadcrumb
4342 canRefine = { canRefine }
4443 cssClasses = { cssClasses }
Original file line number Diff line number Diff line change 1- import ReactDOM from 'react-dom ' ;
1+ import ReactDOM from 'preact-compat ' ;
22import AlgoliasearchHelper from 'algoliasearch-helper' ;
33import rangeInput from '../range-input.js' ;
44
5- jest . mock ( 'react-dom' , ( ) => ( {
6- render : jest . fn ( ) ,
7- } ) ) ;
5+ jest . mock ( 'preact-compat' , ( ) => {
6+ const module = require . requireActual ( 'preact-compat' ) ;
7+
8+ module . render = jest . fn ( ) ;
9+
10+ return module ;
11+ } ) ;
812
913describe ( 'rangeInput' , ( ) => {
1014 const attributeName = 'aNumAttr' ;
Original file line number Diff line number Diff line change 1- import React from 'react' ;
2- import ReactDOM from 'react-dom' ;
1+ import React , { render } from 'preact-compat' ;
32import cx from 'classnames' ;
43import RangeInput from '../../components/RangeInput/RangeInput.js' ;
54import connectRange from '../../connectors/range/connectRange.js' ;
@@ -45,7 +44,7 @@ const renderer = ({
4544 max : maxValue !== Infinity && maxValue !== rangeMax ? maxValue : undefined ,
4645 } ;
4746
48- ReactDOM . render (
47+ render (
4948 < RangeInput
5049 min = { rangeMin }
5150 max = { rangeMax }
You can’t perform that action at this time.
0 commit comments