Skip to content

Releases: cometkim/rescript-vitest

v2.1.1

25 Jun 07:31
47b4dd7
Compare
Choose a tag to compare
  • Support Vite v7+

v2.1.0

24 May 12:35
ab4dcaf
Compare
Choose a tag to compare

What's Changed

  • Adds test.for, it.for, and describe.for bindings by @illusionalsagacity in #28
  • Add skip and skipIf API.
  • Vitest v3.1

Deprecations

Deprecated modules will be removed in v3

  • Vitest.Bindings.BuiltIns is now marked as deprecated. Please bind the test context explicitly.
  • Each module is deprecated. Please use For instead.
  • The chain-of-modules pattern is now deprecated. Skip, Only, Concurrent, but not Todo
    -Skip.test("should be skipped", t => ...)
    
    +test(~skip=true, "should be skipped", t => ...)
    
    // or
    +test("should be skipped", t => {
    +  t->skip
    +})
    Using labeled arguments is easier to maintain and behaves more consistently.
    Todo module is still there because it has a different signature, but you can also pass the ~todo=true argument.

I'm no longer sure about the v10 and curried mode compatibility for all added features.

rescript-vitest v3 may only support ReScript v12+, which has no curried/uncurried mode.

Full Changelog: v2.0.0...v2.1.0

v2.0.0

02 Dec 16:48
fd89d20
Compare
Choose a tag to compare

What's Changed

Full Changelog: v1.5.0...v2.0.0

Context bindings

You should now bind test context explicitly on expect / assertions / hasAssertions

test("My test case", t => {
-  expect(1 + 2)->Expect.toBe(3)
+  t->expect(1+2)->Expect.toBe(3)
})

This ensures the test context is always bound correctly, even in the InSource testing. If you want to keep the old code style, you can open the built-in Vitest.Bindings.BuiltIn, which binds Vitest's built-in global test context as before.

Simple flags

You can now use flags like skip, only, concurrent, etc as the suite's named arguments.

test(~skip=true, "Skipped test", t => { ... })
test(~only=true, "Only test", t => { ... })

(Now I'm considering module-style bindings to keep bindings simple, but still not sure which one users prefer them yet)

Compiler support

rescript-vitest now works for ReScript v10, v11, and v12, regardless uncurried mode

Dependencies

Update Vitest to v2.1.8, which supports Vite 6

v1.5.0

22 Aug 18:01
a1fffc1
Compare
Choose a tag to compare

What's Changed

Full Changelog: v1.4.0...v1.5.0

v1.4.0

21 Apr 07:01
d8e631c
Compare
Choose a tag to compare

What's Changed

Non-feature

New Contributors

Full Changelog: v1.3.0...v1.4.0

v1.3.0

25 Nov 22:27
b4707e2
Compare
Choose a tag to compare

v1.2.0

09 May 15:51
0c31378
Compare
Choose a tag to compare
  • Support ReScript v11 (next)
  • Upgrade vitest version to v0.31.0

v1.1.0

23 Jan 10:29
151c50e
Compare
Choose a tag to compare
  • Support for test.each and describe.each (by @jmagaram)
  • Support for benchmarking
  • Deprecated testPromise and itPromise in favor of *Async alias. Those will be removed in next major.

v1.0.1

12 Dec 20:32
328eb1a
Compare
Choose a tag to compare
  • Fixed Expect.Promise.toThrow and Expect.Promise.toThrowError type

v1.0.0

12 Dec 20:11
3c9eddf
Compare
Choose a tag to compare
  • BREAKING: ReScript v10.1 is required.
  • Switch @ryyppy/rescript-promise to Js.Promise2 for async/await compatibility.
  • Fixed Expect.not binding correctly
  • Added Expect.toBeSome and Expect.toBeNone
  • Added Expect.Promise matchers. (See promise.test.res for detail)
  • Added aliases testAsync and itAsync, which are identical to testPromise and itPromise