Relative Content

Tag Archive for nuxt.jsvitestkey-value-storenitro

Mocking useStorage() using @nuxt/test-utils

The goal is to write a test for a function that uses KV storage, under the hood provided by Nitro, in the Nuxt app. On the client side useStorage() is automatically imported. When writing a test, documentation recommends mocking the function.