cometkim / rescript-vitest

ReScript bindings to Vitest
MIT License
42 stars 9 forks source link

vscode vitest extension doesn't find tests #9

Open jmagaram opened 1 year ago

jmagaram commented 1 year ago

I'm trying to use the vitest extension: https://marketplace.visualstudio.com/items?itemName=ZixuanChen.vitest-explorer It doesn't find any tests even after including paths like this...

  "vitest.include": [
    "**/*.{test,spec}.bs.js",
    "**/*.{test,spec}.{js,mjs,cjs,ts,mts,cts,jsx,tsx}"
  ],

The extension finds the files but shows no tests. Have you been able to get this to work? I'm guessing the problem is that the extension can't handle the rescript wrapper around the vitest code. If I change the .test.bs.js file to directly refer to describe and test in the vitest package it works.

jmagaram commented 1 year ago

I've been investigating. Probably a weakness in the vitest extension or ReScript's ability to completely inline everything.

https://github.com/vitest-dev/vscode/issues/127