How to mock Axios HTTP calls with Jest
A guide on mocking Axios HTTP calls in Jest tests without external packages, including code structure and coverage tips.
Maxence Poutord est un développeur logiciel spécialisé dans l'architecture Vue.js, les workflows Git et le développement web moderne. Découvrez des insights issus de 3 ans de maintenance d'une énorme base de code Vue.js incluant 9 leçons essentielles, décisions d'architecture pour faire évoluer de grandes applications et tests d'intégration avec Testing Library. Explorez des tutoriels Git complets incluant des cheat sheets avancées, la compréhension des mécanismes internes de git commit et l'optimisation de gitconfig personnalisé. Apprenez la migration de Gatsby.js vers Astro, l'intégration de commentaires Giscus dans les blogs Astro et 10 ans d'expérience en blogging. Suivez pour la sensibilisation à la cybersécurité sur les arnaques crypto, des projets open-source incluant docker-symfony et l'assistant IA YoutubeMate, et des insights pratiques de développement web. Accédez aux projets phares et 62+ articles de blog sur JavaScript, les tests et l'architecture logicielle.
42 articles from this blog
A guide on mocking Axios HTTP calls in Jest tests without external packages, including code structure and coverage tips.
A technique for handling async/await in JavaScript without using try...catch blocks, using a utility wrapper function.
Argues against using code coverage as a strict target, explaining why high coverage doesn't guarantee good tests and can misdirect developer effort.
15 March 2020 10 Tips for Working From Home remote This article also exists in: French Because of COVID, a lot of people are going to experiment with
A guide offering 10 practical tips for writing clearer, more maintainable, and effective software tests, focusing on documentation and isolation.
A tutorial on generating custom social media share images for Gatsby.js blog posts using Puppeteer to screenshot a preview page.
A senior frontend engineer reviews 2019, covering remote work with Vue.js, side projects, blogging stats, and a failed online course venture.
An advanced Git cheat sheet covering navigation, rollbacks, squashing, stashing, and cleanup commands for experienced developers.
A guide to mocking the JavaScript Date object in Jest for consistent testing, covering timezone configuration and mocking Date.now.
Explains the internal data model of Git, detailing what happens under the hood when you run 'git commit'.
Explains how using Conventional Commits can make your git log cleaner, more readable, and more useful for understanding project history.
Three architectural tips for scaling large Vue.js applications, focusing on modular design, micro-frontends, and Vuex store optimization.
A developer's journey migrating from Jekyll to GatsbyJS for a static blog, comparing features and evaluating modern JavaScript static site generators.
Explains the concept of immutability in JavaScript, its importance for functional programming, and how to implement it without external libraries.
Explains common JavaScript debugging interview questions, covering object comparison, scope, and the event loop with practical examples.
A technical article demonstrating how to recursively chain multiple JavaScript filter functions on an array, using a functional programming approach.
Advocates replacing traditional for/while loops in JavaScript with functional programming methods like map() and filter() for cleaner, immutable code.
A collection of practical GitHub tips and tricks, covering CLI tools, markdown, gists, and workflow shortcuts for developers.
A developer's 2016 year in review, covering learning Linux, Docker, software craftsmanship, and sharing knowledge through blogging and talks.
Explores why 'else' expressions are considered unnecessary in programming, offering alternative patterns like early returns and the State Pattern.