Skip to content

Commit db8ab93

Browse files
committed
deprecate BuiltIn module
1 parent 156ff7a commit db8ab93

2 files changed

Lines changed: 5 additions & 7 deletions

File tree

README.md

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -67,19 +67,16 @@ if Vitest.inSource {
6767

6868
You need to bind test context `t` explicitly.
6969

70-
If you're migrating from 1.x, there is a built-in context binding in `Vitest.Bindings.BuiltIn`.
71-
7270
```diff
7371
open Vitest
74-
+open Vitest.Bindings.BuiltIn
7572

7673
describe("Hello, Vitest", t => {
7774
test("This is a test case", t => {
78-
- t->assertions(3)
79-
+ assertions(3)
75+
- assertions(3)
76+
+ t->assertions(3)
8077

81-
- t->expect(1 + 2)->Expect.toBe(3)
82-
+ expect(1 + 2)->Expect.toBe(3)
78+
- expect(1 + 2)->Expect.toBe(3)
79+
+ t->expect(1 + 2)->Expect.toBe(3)
8380
})
8481
})
8582
```

src/Vitest_Bindings.res

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
open Vitest_Types
22

3+
@deprecated("Implicit `BuiltIn` binding is deprecated, please bind the `t` context explicitly.")
34
module BuiltIn = {
45
@module("vitest") @val
56
external testCtx: testCtx = "expect"

0 commit comments

Comments
 (0)