rescript-vitest icon indicating copy to clipboard operation
rescript-vitest copied to clipboard

vscode vitest extension doesn't find tests

Open jmagaram opened this issue 2 years ago • 1 comments

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 avatar Jan 24 '23 01:01 jmagaram

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

jmagaram avatar Jan 25 '23 23:01 jmagaram