You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Consider the test file below. All of these tests execute when run using the vitest command; I can see the results for all in the VS Code terminal. But only the last test is shown in the VS Code Test Explorer; the rest are ignored.
import { assert, test, test as testDup1 } from "vitest";
import * as V from "vitest";
// Not detected by extension
V.test("math with default export", function () {
assert.equal(1, 1);
});
// Not detected by extension
testDup1("math with aliased test import", function () {
assert.equal(1, 1);
});
// Not detected by extension
const testDup2 = test;
testDup2("with copied test function variable", function () {
assert.equal(1, 1);
});
// Not detected by extension
// eslint-disable-next-line @typescript-eslint/no-unsafe-argument
const testWithTimeout = (title, f) => test(title, f, 3000);
testWithTimeout("with wrapper convenience method", function () {
assert.equal(1, 1);
});
// Works; detected by extension
test("works 1", function () {
assert.equal(1, 1);
});
export {};
This is on macOS, latest VS Code, vitest ^0.28.0 and extension dated 1/19/2023.
I ran into this problem while attempting to use vitest from the ReScript programming language. I wrote a binding - just a simple line or two - and it generates this kind of javascript. All tests authored in Rescript go through this wrapper. I'm going to look into whether ReScript can inline everything, so the wrapper disappears, but so far no luck with that.
// Generated by ReScript, PLEASE EDIT WITH CARE
import * as Curry from "rescript/lib/es6/curry.js";
import * as Vitest from "vitest";
function test(name, f, timeout) {
Vitest.test(name, (function () {
return Curry._1(f, undefined);
}), timeout);
}
export {
test ,
}
The text was updated successfully, but these errors were encountered:
Consider the test file below. All of these tests execute when run using the
vitest
command; I can see the results for all in the VS Code terminal. But only the last test is shown in the VS Code Test Explorer; the rest are ignored.This is on macOS, latest VS Code, vitest
^0.28.0
and extension dated1/19/2023
.I ran into this problem while attempting to use vitest from the
ReScript
programming language. I wrote a binding - just a simple line or two - and it generates this kind of javascript. All tests authored inRescript
go through this wrapper. I'm going to look into whether ReScript can inline everything, so the wrapper disappears, but so far no luck with that.The text was updated successfully, but these errors were encountered: