nytimes / react-tracking

🎯 Declarative tracking for React apps.
https://open.nytimes.com/introducing-react-tracking-declarative-tracking-for-react-apps-2c76706bb79a
Other
1.88k stars 123 forks source link

add testing instructions #115

Open saidkholov opened 5 years ago

dutzi commented 5 years ago

This doesn't work for me, I have a component set up like this:

@track((props) => ({
  some_prop: props.something ? 'value-1' : 'value-2',
}))
export class MyComponent extends Component {
  ...
})
saidkholov commented 5 years ago

The instructions are to test methods within a class. You might want to mock the library to successfully test in your case