Skip to content

Commit a3a2e11

Browse files
committed
prepare
1 parent 69b95ca commit a3a2e11

File tree

1 file changed

+18
-5
lines changed

1 file changed

+18
-5
lines changed

src/analyze_fixture_tests/AnalyzeFixtureTests.re

Lines changed: 18 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -31,14 +31,27 @@ Printexc.record_backtrace(true);
3131
// };
3232

3333
let projectDirs = [
34-
"./examples/bs-3.1.5",
35-
"./examples/dune",
36-
"./examples/example-react",
37-
"."
34+
("./examples/bs-3.1.5", "npm i"),
35+
("./examples/dune", "esy"),
36+
("./examples/example-react", "npm i"),
37+
(".", "esy")
3838
];
3939

4040
let baseDir = Sys.getcwd();
41-
projectDirs->Belt.List.forEach(projectDir => {
41+
projectDirs->Belt.List.forEach(((projectDir, prepareCommand)) => {
42+
43+
let {describe} =
44+
describeConfig
45+
|> withLifecycle(testLifecycle =>
46+
testLifecycle
47+
|> beforeAll(() => {
48+
let (stdout, stderr, success) = Util.Commands.execFull(~pwd=projectDir, prepareCommand);
49+
if (!success) {
50+
failwith("Unable to run " ++ prepareCommand ++ " in " ++ projectDir)
51+
}
52+
})
53+
)
54+
|> build;
4255

4356
let compilerVersion = switch (TestUtils.compilerForProjectDir(projectDir)) {
4457
| Error(e) =>

0 commit comments

Comments
 (0)