Artikelen over Jest

Artikelen over Jest

Jest

How to test Nuxt.js asyncData and fetch hooks

Nuxt's asyncData and fetch hooks need a different testing approach from ordinary Vue component methods. This article demonstrates calling hooks directly and supplying their context explicitly. It also draws the boundary around those tests: checking a hook's logic is useful, but it does not prove that Nuxt invokes it correctly during navigation or rendering.

Continue reading

Unit testen van private methods in Angular

Hoe test je logica in een private Angular-method zonder die alleen voor een test public te maken? Dit artikel bespreekt testen via publiek gedrag, het verplaatsen van logica naar een service en een directe benadering wanneer dat niet past. De centrale vraag: wat wil je bewijzen, en hoeveel moet je test daarvoor van de implementatie weten?

Lees verder