Skip to content

Commit a1cad54

Browse files
authored
perf: remove unused code (#1788)
1 parent 31b97f9 commit a1cad54

File tree

1 file changed

+1
-18
lines changed

1 file changed

+1
-18
lines changed

test/components/connect.spec.tsx

+1-18
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*eslint-disable react/prop-types*/
22

3-
import React, { Component, MouseEvent, ComponentType } from 'react'
3+
import React, { Component, MouseEvent } from 'react'
44
import createClass from 'create-react-class'
55
import PropTypes from 'prop-types'
66
import ReactDOM from 'react-dom'
@@ -81,23 +81,6 @@ describe('React', () => {
8181
return action.type === 'APPEND' ? prev + action.body : prev
8282
}
8383

84-
function imitateHotReloading(
85-
TargetClass: ComponentType,
86-
SourceClass: ComponentType,
87-
container: Component
88-
) {
89-
// Crude imitation of hot reloading that does the job
90-
Object.getOwnPropertyNames(SourceClass.prototype)
91-
.filter((key) => typeof SourceClass.prototype[key] === 'function')
92-
.forEach((key) => {
93-
if (key !== 'render' && key !== 'constructor') {
94-
TargetClass.prototype[key] = SourceClass.prototype[key]
95-
}
96-
})
97-
98-
container.forceUpdate()
99-
}
100-
10184
afterEach(() => rtl.cleanup())
10285

10386
describe('Core subscription and prop passing behavior', () => {

0 commit comments

Comments
 (0)