Skip to content

Commit 3c082ea

Browse files
committed
Fixing broken test with Babel 6
1 parent 5f66058 commit 3c082ea

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

test/components/connect.spec.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -985,13 +985,14 @@ describe('React', () => {
985985

986986
function imitateHotReloading(TargetClass, SourceClass) {
987987
// Crude imitation of hot reloading that does the job
988-
Object.keys(SourceClass.prototype).filter(key =>
988+
Object.getOwnPropertyNames(SourceClass.prototype).filter(key =>
989989
typeof SourceClass.prototype[key] === 'function'
990990
).forEach(key => {
991-
if (key !== 'render') {
991+
if (key !== 'render' && key !== 'constructor') {
992992
TargetClass.prototype[key] = SourceClass.prototype[key]
993993
}
994994
})
995+
995996
container.forceUpdate()
996997
}
997998

0 commit comments

Comments
 (0)