Skip to content

Commit

Permalink
add binding to todo()
Browse files Browse the repository at this point in the history
  • Loading branch information
cometkim committed May 10, 2023
1 parent 4f83054 commit 83db372
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
3 changes: 3 additions & 0 deletions examples/run.res
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@ let bench =
b := a.contents - b.contents
a := b.contents - a.contents
})
->Bench.todo("unimplemented bench")

await bench.run(.)

bench.table(.)->Console.table
bench.todos->Array.map(({name}) => {name})->Console.table
4 changes: 4 additions & 0 deletions src/Bench.res
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ type t = {
reset: (. unit) => unit,
table: (. unit) => Js.Dict.t<string>,
tasks: array<Task.t>,
todos: array<Task.t>,
results: array<option<Task.result>>,
}

Expand Down Expand Up @@ -73,6 +74,9 @@ external add: (t, string, unit => unit) => t = "add"
@send
external addAsync: (t, string, unit => Js.Promise2.t<unit>) => t = "add"

@send
external todo: (t, string) => t = "todo"

@send
external remove: (t, string) => t = "remove"

Expand Down

0 comments on commit 83db372

Please sign in to comment.