···303303304304### Checking Tags Filter at Runtime
305305306306-You can use `TestRunner.matchesTagsFilter` (since Vitest 4.1.1) to check whether the current tags filter matches a set of tags. This is useful for conditionally running expensive setup logic only when relevant tests are included:
306306+You can use `TestRunner.matchesTags` (since Vitest 4.1.1) to check whether the current tags filter matches a set of tags. This is useful for conditionally running expensive setup logic only when relevant tests are included:
307307308308```ts
309309import { beforeAll, TestRunner } from 'vitest'
310310311311beforeAll(async () => {
312312 // Seed database when "vitest --tags-filter db" is used
313313- if (TestRunner.matchesTagsFilter(['db'])) {
313313+ if (TestRunner.matchesTags(['db'])) {
314314 await seedDatabase()
315315 }
316316})