Fix Vue unit tests

Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
Thomas Citharel
2021-06-04 20:24:43 +02:00
parent f100fce0da
commit 51106841ab
18 changed files with 283 additions and 66 deletions

View File

@@ -3,10 +3,14 @@ import PostListItem from "@/components/Post/PostListItem.vue";
import Buefy from "buefy";
import VueRouter from "vue-router";
import { routes } from "@/router";
import { enUS } from "date-fns/locale";
const localVue = createLocalVue();
localVue.use(Buefy);
localVue.use(VueRouter);
localVue.use((vue) => {
vue.prototype.$dateFnsLocale = enUS;
});
const router = new VueRouter({ routes, mode: "history" });
config.mocks.$t = (key: string): string => key;