JS: Add mobx-react and mobx-react-lite tests

This commit is contained in:
Asger F
2026-02-19 11:20:04 +01:00
parent 63329b47d8
commit a0099d64c8
3 changed files with 7 additions and 5 deletions

View File

@@ -5,6 +5,8 @@ import styled from 'styled-components';
import unknownFunction from 'somewhere';
import { hot } from 'react-hot-loader';
import { withState } from 'recompose';
import { observer as observer1 } from 'mobx-react';
import { observer as observer2 } from 'mobx-react-lite';
import { MyComponent } from './exportedComponent';
@@ -25,4 +27,6 @@ const ConnectedComponent = compose(withConnect, unknownFunction)(StyledComponent
const ConnectedComponent2 = withState('counter', 'setCounter', 0)(ConnectedComponent);
export default hot(module)(memo(forwardRef(ConnectedComponent2)));
const ConnectedComponent3 = observer1(observer2(ConnectedComponent2));
export default hot(module)(memo(forwardRef(ConnectedComponent3)));

View File

@@ -10,8 +10,6 @@ getACandidatePropsValue
| props.js:30:46:30:67 | "propFr ... tProps" |
| props.js:32:22:32:34 | "propFromJSX" |
| props.js:34:33:34:53 | "propFr ... ructor" |
| useHigherOrderComponent.jsx:5:33:5:37 | "red" |
| useHigherOrderComponent.jsx:11:39:11:44 | "lazy" |
| useHigherOrderComponent.jsx:17:40:17:46 | "lazy2" |
getACandidateStateSource
| es6.js:14:1:20:1 | class H ... }\\n} | es6.js:18:22:18:31 | { baz: 42} |

View File

@@ -2,13 +2,13 @@ import SomeComponent from './higherOrderComponent';
import { lazy } from 'react';
function foo() {
return <SomeComponent color="red"/> // $ getACandidatePropsValue
return <SomeComponent color="red"/> // $ MISSING: getACandidatePropsValue
}
const LazyLoadedComponent = lazy(() => import('./higherOrderComponent'));
function bar() {
return <LazyLoadedComponent color="lazy"/> // $ getACandidatePropsValue
return <LazyLoadedComponent color="lazy"/> // $ MISSING: getACandidatePropsValue
}
const LazyLoadedComponent2 = lazy(() => import('./exportedComponent').then(m => m.MyComponent));