|
1 | 1 | // @ts-check |
2 | 2 |
|
3 | 3 | import * as fs from "node:fs"; |
4 | | -import * as os from "node:os"; |
5 | 4 | import * as path from "node:path"; |
6 | 5 | import { |
7 | 6 | buildTestDir, |
@@ -184,54 +183,49 @@ if (buildTest) { |
184 | 183 | } |
185 | 184 |
|
186 | 185 | if (runtimeDocstrings) { |
187 | | - if (process.platform === "darwin" && os.release().startsWith("22")) { |
188 | | - // Workaround for intermittent hangs in CI |
189 | | - console.log("Skipping docstrings tests on macOS 13"); |
190 | | - } else { |
191 | | - console.log("Running runtime docstrings tests"); |
| 186 | + console.log("Running runtime docstrings tests"); |
192 | 187 |
|
193 | | - const generated_mocha_test_res = path.join( |
194 | | - docstringTestDir, |
195 | | - "generated_mocha_test.res", |
196 | | - ); |
| 188 | + const generated_mocha_test_res = path.join( |
| 189 | + docstringTestDir, |
| 190 | + "generated_mocha_test.res", |
| 191 | + ); |
197 | 192 |
|
198 | | - // This generated source file is checked during the initial build below, so |
199 | | - // a stale copy from an earlier run can fail before we regenerate it. |
200 | | - await fs.promises.rm(generated_mocha_test_res, { force: true }); |
| 193 | + // This generated source file is checked during the initial build below, so |
| 194 | + // a stale copy from an earlier run can fail before we regenerate it. |
| 195 | + await fs.promises.rm(generated_mocha_test_res, { force: true }); |
201 | 196 |
|
202 | | - await execClean([], { |
203 | | - cwd: docstringTestDir, |
204 | | - stdio: "inherit", |
205 | | - }); |
| 197 | + await execClean([], { |
| 198 | + cwd: docstringTestDir, |
| 199 | + stdio: "inherit", |
| 200 | + }); |
206 | 201 |
|
207 | | - await execBuild([], { |
208 | | - cwd: docstringTestDir, |
209 | | - stdio: "inherit", |
210 | | - }); |
| 202 | + await execBuild([], { |
| 203 | + cwd: docstringTestDir, |
| 204 | + stdio: "inherit", |
| 205 | + }); |
211 | 206 |
|
212 | | - // Generate rescript file with all tests `generated_mocha_test.res` |
213 | | - await node(path.join(docstringTestDir, "DocTest.res.js"), [], { |
214 | | - cwd: projectDir, |
215 | | - stdio: "inherit", |
216 | | - }); |
| 207 | + // Generate rescript file with all tests `generated_mocha_test.res` |
| 208 | + await node(path.join(docstringTestDir, "DocTest.res.js"), [], { |
| 209 | + cwd: projectDir, |
| 210 | + stdio: "inherit", |
| 211 | + }); |
217 | 212 |
|
218 | | - // Build again to check if generated_mocha_test.res has syntax or type erros |
219 | | - await execBuild([], { |
220 | | - cwd: docstringTestDir, |
221 | | - stdio: "inherit", |
222 | | - }); |
| 213 | + // Build again to check if generated_mocha_test.res has syntax or type erros |
| 214 | + await execBuild([], { |
| 215 | + cwd: docstringTestDir, |
| 216 | + stdio: "inherit", |
| 217 | + }); |
223 | 218 |
|
224 | | - // Format generated_mocha_test.res |
225 | | - console.log("Formatting generated_mocha_test.res"); |
226 | | - await rescript("format", [generated_mocha_test_res], { |
227 | | - cwd: projectDir, |
228 | | - stdio: "inherit", |
229 | | - }); |
| 219 | + // Format generated_mocha_test.res |
| 220 | + console.log("Formatting generated_mocha_test.res"); |
| 221 | + await rescript("format", [generated_mocha_test_res], { |
| 222 | + cwd: projectDir, |
| 223 | + stdio: "inherit", |
| 224 | + }); |
230 | 225 |
|
231 | | - console.log("Run mocha test"); |
232 | | - await mocha([path.join(docstringTestDir, "generated_mocha_test.res.js")], { |
233 | | - cwd: projectDir, |
234 | | - stdio: "inherit", |
235 | | - }); |
236 | | - } |
| 226 | + console.log("Run mocha test"); |
| 227 | + await mocha([path.join(docstringTestDir, "generated_mocha_test.res.js")], { |
| 228 | + cwd: projectDir, |
| 229 | + stdio: "inherit", |
| 230 | + }); |
237 | 231 | } |
0 commit comments