Testing Vuex
To show how to test a component that relies on Vuex (Vue.js's official global state management solution), we'll implement and test a newsletter subscription banner.
To start with, we should create the banner template. The banner will contain a Subscribe to the newsletter
call to action and a close icon:
<template> <div class="text-center py-4 md:px-4"> <div class="py-2 px-4 bg-indigo-800 items-center text-indigo-100 leading-none md:rounded-full flex md:inline-flex" role="alert" > <span class="font-semibold ml-2 md:mr-2 text-left flex-auto" > Subscribe to the newsletter...