React: Testing and Debugging Flashcards
1
Q
What’s the name of the testing package that comes out of the box with create-react-app?
A
Jest
2
Q
What library can you use for type-checking?
A
Flow
3
Q
How do you initialize flow?
A
After having installed the npm package, and having added a “flow” target to react scripts that simply runs “flow, you run npm run flow init
.
4
Q
How do you tell flow to check the types of a file?
A
You add a comma to the first line of that file that reads “ // @flow