Skip to content

Commit 1f4c21b

Browse files
committed
Doc tests speedup: run exe directly, not via node
1 parent fa073e8 commit 1f4c21b

File tree

2 files changed

+9
-6
lines changed

2 files changed

+9
-6
lines changed

tests/docstring_tests/DocTest.res

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
open Node
22

3+
@module("../../cli/common/bins.js")
4+
external rescript_tools_exe: string = "rescript_tools_exe"
5+
36
// Only major version
47
let nodeVersion =
58
Process.version
@@ -43,10 +46,8 @@ let getOutput = buffer =>
4346
->Array.join("")
4447

4548
let extractDocFromFile = async file => {
46-
let toolsBin = Path.join([Process.cwd(), "cli", "rescript-tools.js"])
47-
4849
let {stdout} = await SpawnAsync.run(
49-
~command=toolsBin,
50+
~command=rescript_tools_exe,
5051
~args=["extract-codeblocks", file, "--transform-assert-equal"],
5152
)
5253

tests/docstring_tests/DocTest.res.js

Lines changed: 5 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)