From 61d65504b8bf181d764e199da7fdab71da15408f Mon Sep 17 00:00:00 2001 From: du Date: Thu, 5 Aug 2021 10:54:48 +0800 Subject: [PATCH] perf: remove unused code --- test/components/connect.spec.tsx | 19 +------------------ 1 file changed, 1 insertion(+), 18 deletions(-) diff --git a/test/components/connect.spec.tsx b/test/components/connect.spec.tsx index afd4e187f..a63660e99 100644 --- a/test/components/connect.spec.tsx +++ b/test/components/connect.spec.tsx @@ -1,6 +1,6 @@ /*eslint-disable react/prop-types*/ -import React, { Component, MouseEvent, ComponentType } from 'react' +import React, { Component, MouseEvent } from 'react' import createClass from 'create-react-class' import PropTypes from 'prop-types' import ReactDOM from 'react-dom' @@ -81,23 +81,6 @@ describe('React', () => { return action.type === 'APPEND' ? prev + action.body : prev } - function imitateHotReloading( - TargetClass: ComponentType, - SourceClass: ComponentType, - container: Component - ) { - // Crude imitation of hot reloading that does the job - Object.getOwnPropertyNames(SourceClass.prototype) - .filter((key) => typeof SourceClass.prototype[key] === 'function') - .forEach((key) => { - if (key !== 'render' && key !== 'constructor') { - TargetClass.prototype[key] = SourceClass.prototype[key] - } - }) - - container.forceUpdate() - } - afterEach(() => rtl.cleanup()) describe('Core subscription and prop passing behavior', () => {