Skip to content

Commit

Permalink
perf: remove unused code (#1788)
Browse files Browse the repository at this point in the history
  • Loading branch information
myNameIsDu committed Aug 5, 2021
1 parent 31b97f9 commit a1cad54
Showing 1 changed file with 1 addition and 18 deletions.
19 changes: 1 addition & 18 deletions 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'
Expand Down Expand Up @@ -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', () => {
Expand Down

0 comments on commit a1cad54

Please sign in to comment.