Before moving forward, we have some duplicated code in our spec. Backed up by the last commit on the green state we can try out some refactors. I can see 3 methods to extract to helper functions:

  1. Post object creation
  2. Wrapper creation
  3. Formatted date assertion

I will let you do this refactor but you can find my code.
After removing code duplications and making assertions more clear, let’s look back at our requirements for the post item.

#vue-test-utils #unit-testing #testing

Testing a Component in Vue.js
1.20 GEEK