Skip to content

Commit

Permalink
Build pass and more tests pass, eslint still failing
Browse files Browse the repository at this point in the history
  • Loading branch information
Havunen committed Sep 6, 2023
1 parent f045e75 commit e2546a4
Show file tree
Hide file tree
Showing 10 changed files with 161 additions and 313 deletions.
1 change: 0 additions & 1 deletion packages/inferno-compat/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@ install `rc-css-transition-group-modern` package.

### `react`

- `React.createClass`
- `React.createElement`
- `React.cloneElement`
- `React.Component`
Expand Down
24 changes: 12 additions & 12 deletions packages/inferno-compat/__tests__/ReactClass.spec.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -249,17 +249,17 @@ describe('ReactClass-spec', function () {
}
}

const Outer = React.createClass({
childContextTypes: {
class Outer extends React.Component{
static childContextTypes = {
className: React.PropTypes.string,
},
}
getChildContext() {
return { className: 'foo' };
},
}
render() {
return <Foo />;
},
});
}
}

const container = document.createElement('div');
ReactDOM.render(<Outer />, container);
Expand Down Expand Up @@ -287,14 +287,14 @@ describe('ReactClass-spec', function () {
// });

it('should work with a null getInitialState() return value', function () {
const Component = React.createClass({
getInitialState: function () {
class Component extends React.Component{
getInitialState() {
return null;
},
render: function () {
}
render() {
return <span />;
},
});
}
}
expect(() => renderIntoDocument(<Component />)).not.toThrow();
});

Expand Down
4 changes: 2 additions & 2 deletions packages/inferno-compat/__tests__/ReactComponent.spec.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -227,15 +227,15 @@ describe('ReactComponent', function () {
}

class Child extends React.Component {
static childContextTypes: {
static childContextTypes = {
foo: React.PropTypes.string
};

getChildContext() {
return {
foo: 'bar'
};
},
}

render() {
return React.Children.only(this.props.children);
Expand Down
Loading

0 comments on commit e2546a4

Please sign in to comment.