Back to Ava

Testing Vue.js components

docs/recipes/vue.md

8.0.01.2 KB
Original Source

Testing Vue.js components

Translations: Français

Dependencies

Status

This recipe relied on legacy require() hooks. AVA is ESM-only, so this setup is no longer supported.

Precompile your Vue components before running AVA, or use tooling that provides an ESM loader for .vue files.

Coverage reporting

Follow the coverage reporting recipe, additionally adding the .vue extension to the c8 config to instrument .vue files.

json
{
	"c8": {
		"extension": [
			".js",
			".vue"
		]
	}
}