marilari88 / neotest-vitest

Vitest adapter for Neovim Neotest plugin
92 stars 34 forks source link

feat: support vite config file #37

Closed SingletonSean closed 8 months ago

SingletonSean commented 8 months ago

Changes

Motivation

Currently, neotest-vitest only supports vitest.config.js and vitest.config.ts. However, the Vitest docs call out that vite.config.js and vite.config.ts are valid configuration files: https://vitest.dev/config/#configuration

This change ensures that projects leveraging vite.config.js and vite.config.ts can use neotest-vitest without having to restructure or rename their Vitest config files.

Testing

Unit tests based on the new ./spec/config directory should cover the support and precedence rules for Vite and Vitest config files. I also went through and tested it manually to make sure it was actually working 🙂

marilari88 commented 8 months ago

@SingletonSean Great job! I also really appreciate that you wrote the tests