vuejs

Archi & Techno

Vue.js unit test cases with vue-test-utils and Jest

This article describes test contexts, from common to more complex ones, on a Vue.js stack. You may read TDD with Vue.js article as an introduction, which is mainly focused on methodology (Test Driven Development). This current article describes a wider range of test contexts based on Vue.js, using vue-test-utils helpers and the Jest testing framework.   1/ Jest Jest is a testing framework developed and used by Facebook to test JavaScript code. Its main goal is to simplify test configuration. It integrates most of the…

Lire la suite
Archi & Techno

TDD with Vue.js

Introduction: We've all heard of Vue.js, the last trendy JavaScript framework. Some have already played with it. But beyond the POC, it's time to gear up for real life Vue.js projects. And what's better than some TDD with Vue.js to achieve that? The point of this article is to share the basics to develop with Vue.js using TDD. To do so, we will use a very simple component based on Vue CLI default template. We will add to it a few WebFront basic features: two…

Lire la suite
Archi & techno

Vue.js en TDD

Introduction :   On a tous entendu parler de Vue.js, le dernier framework JavaScript du moment. Certains l’ont déjà expérimenté. Mais au-delà du POC, il est temps de s’armer pour réaliser des grands projets Vue.js en production. Quoi de mieux pour cela que d’apprendre à utiliser Vue.js en TDD ? L’objectif de cet article est de partager les bases pour partir en TDD sur Vue.js. Afin d’y parvenir, on réalise un composant très simple, basé sur le template initialement généré par le Vue CLI, sur…

Lire la suite