We're following along with the book Testing Vue.js Applications from 2018. The concepts are the same today, but the tooling has changed a bit.
- webpack --> Vite
- jest --> vitest
- ? --> ?
We'll see as we go.
jest had a --watch mode but vitest seems to do that by default and with HMR
Work out something loose here to chop up and scoot around later
Basic examples
expects(something).toBe(something)
expects(something.text()).toContain("string")
Talk about basic async situations
Right here ---- it would be good to go into as much exploration of the core vitest methods before adding other libraries ---
mounting components. helper functions and methods. mount(component)
shallowMount()
(gets you that "wrapper") text()
find(selector)
findAll(selector)
attributes()
...
Current page in the book: 59