[Vuejs]-Mock i18n for vue with jest

-2👍

I believe you’ll need to add i18n to Vue as below

Vue.use(VueI18n);

const i18n = new VueI18n({
    locale: "en",
    messages
});

new Vue({
    i18n,  <==
    ...
    render: h => h(App)
}).$mount("#app");

in your code where you initialize the main vue app.

Leave a comment