linux-china / vitest-jetbrains-plugin

Vitest JetBrains plugin
https://plugins.jetbrains.com/plugin/19220-vitest-runner
Apache License 2.0
52 stars 6 forks source link

Not working with WSL (Windows Subsystem for Linux) #8

Closed SirMishaa closed 2 years ago

SirMishaa commented 2 years ago

Hello

It looks like it doesn't work with WSL. I got the following error message:

Cannot run program "\wsl$\Ubuntu\home\mishaa\dev\deepvue\node_modules.bin\vitest.CMD" (in directory "\wsl$\Ubuntu\home\mishaa\dev\deepvue"): CreateProcess error=2, Le fichier spécifié est introuvable

I'm using this template : https://github.com/antfu/vitesse-lite for Vue 3 and Vitest test framework. It's working good with CLI. I'm under the last version of PHPStorm. Same error with Webstorm.

The basic tere is here :

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

describe('Hi', () => {
  it('should works', () => {
    expect(1 + 1).toEqual(2)
  })
})

image

image

image

SirMishaa commented 2 years ago

And yes, of course, the file is here. It looks like the plugin try to open the file in a "windows way".

image

linux-china commented 2 years ago

It looks like the plugin try to open the file in a "windows way".

I will treat WSL as Linux. Could you try this version? If it works, and I will release a new version. Sorry I have no WSL env for testing.

vitest-jetbrains-plugin-0.2.3.zip

SirMishaa commented 2 years ago

Same error: image

linux-china commented 2 years ago

@SirMishaa could you post your command line to run test in WSL alike `vitest run -t 'Hi' test/basic.test.ts'? thanks.

linux-china commented 2 years ago

Now use npm exec -- vitest to run test, and OS detection not required. Please try new 0.5.0 version.