From dbbf09ae9503f299ec8a5b2ba3f3523b4593df2e Mon Sep 17 00:00:00 2001 From: afc163 Date: Thu, 27 Apr 2017 21:12:23 +0800 Subject: [PATCH] fix createClass in test --- components/upload/__tests__/upload.test.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/components/upload/__tests__/upload.test.js b/components/upload/__tests__/upload.test.js index abfd53129..4e058bfbe 100644 --- a/components/upload/__tests__/upload.test.js +++ b/components/upload/__tests__/upload.test.js @@ -7,18 +7,18 @@ describe('Upload', () => { // https://github.com/react-component/upload/issues/36 it('should get refs inside Upload in componentDidMount', () => { let ref; - const App = React.createClass({ + class App extends React.Comoponent { componentDidMount() { ref = this.refs.input; - }, + } render() { return ( ); - }, - }); + } + } mount(); expect(ref).toBeDefined(); });