vim-test / vim-test

Run your tests at the speed of thought

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Vitest :TestNearest not working

v-ostark opened this issue · comments

I have the following code

import { describe, it, expect } from 'vitest'

describe('will', () => {
    it('should do good stuff', () => {
        console.log('a')
        expect(true).toBeTruthy()
    })
})

When using :TestNearest

I get the following:

node_modules/.bin/vitest run --no-coverage -t '^will should do good stuff$' tests/middleware/auth.test.ts

 RUN  v0.24.3 /Users/User/Code/test

 ↓ tests/middleware/auth.test.ts (1) [skipped]

Test Files  1 skipped (1)
     Tests  1 skipped (1)
  Start at  16:45:28
  Duration  901ms (transform 214ms, setup 1ms, collect 12ms, tests 0ms)

The issue seems to be "^" and "$". It works if I run it like this:
node_modules/.bin/vitest run --no-coverage -t 'will should do good stuff' tests/middleware/auth.test.ts

I've merged in a change that might fix this, could you please update your plug-ins and confirm

I confirm the fix is working, thanks!

Closing the issue