Skip to content

Commit a0cf264

Browse files
committed
fix bindings
1 parent 4583368 commit a0cf264

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

src/Vitest.res

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -914,6 +914,8 @@ module Assert = Vitest_Assert
914914

915915
module Vi = Vitest_Helpers
916916

917+
module Bindings = Vitest_Bindings
918+
917919
@send
918920
external expect: (testCtx, 'a) => expected<'a> = "expect"
919921

@@ -930,8 +932,6 @@ external hasAssertion: testCtxExpect => unit = "hasAssertion"
930932
@inline
931933
let hasAssertion = testCtx => testCtx->inner->hasAssertion
932934

933-
module Bindings = Vitest_Bindings
934-
935935
@scope("import.meta") @val
936936
external inSource: bool = "vitest"
937937

src/Vitest_Bindings.res

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,12 @@ module BuiltIn = {
77
@module("vitest")
88
external expect: 'a => expected<'a> = "expect"
99

10-
let expect = x => testCtx->expect(x)
10+
@send
11+
external assertions: (testCtx, int) => unit = "assertions"
1112
let assertions = x => testCtx->assertions(x)
13+
14+
@send
15+
external hasAssertion: testCtx => unit = "hasAssertion"
1216
let hasAssertion = () => testCtx->hasAssertion
1317
}
1418

0 commit comments

Comments
 (0)