cometkim / rescript-vitest

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

all tests are skipped #3

Closed giraud closed 2 years ago

giraud commented 2 years ago

Hi, using rescript-vitest#0.1.1 with vitest#0.2.7, all tests written in rescript are skipped, they are never run and never fail.

this is the generated code:

Vitest.describe("T1", undefined, (function (param) {
        return Vitest.it("T11", undefined, (function (_t) {
                      Vitest$1.expect(1).toEqual(32);

                    }));
      }));

if I manually change it to:

Vitest$1.describe("T1", (function (param) {
        return Vitest$1.it("T11", (function (_t) {
                      Vitest$1.expect(1).toEqual(32);

                    }));
      }));

then it works.

thomaszdxsn commented 2 years ago

same issue

cometkim commented 2 years ago

Please provide a reproducible ReScript source code as well.

thomaszdxsn commented 2 years ago

the reason is vitest#0.2.7, when i turn my version to "^0.1.13", it's worked

cometkim commented 2 years ago

I see.

Hmm, I think I should provide vitest as dependency instead of using peer's one

Already did, It is not intended to use with hoisted peer dependencies.

I will update it to 0.2.x soon.

cometkim commented 2 years ago

@giraud @thomaszdxsn

I just released a new version. Can you try again with v0.2.0?

This is expected result: image

thomaszdxsn commented 2 years ago

Sorry, I just try vitest but found can't swith my project to es6. So I turn test framework to rescript-jest.

Maybe use vitest on next project

giraud commented 2 years ago

@cometkim thank you for the update. unfortunately, it's the same. something might be wrong with my config. I'm closing that bug because I don't have time to go deeper.