Skip to content

Commit e482294

Browse files
committed
test single file
1 parent 70ef72e commit e482294

File tree

2 files changed

+16
-3
lines changed

2 files changed

+16
-3
lines changed

tests/docstrings_examples/DocTest.res

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,13 @@ let runtimeTests = async code => {
149149
},
150150
)
151151

152+
Console.log({
153+
"code": code,
154+
"exitCode": exitCode,
155+
"stdout": stdout,
156+
"stderr": stderr,
157+
})
158+
152159
// Some expressions, like, `console.error("error")` is printed to stderr but
153160
// exit code is 0
154161
let std = switch exitCode->Null.toOption {
@@ -308,7 +315,7 @@ let main = async () => {
308315
// Ignore Js modules and RescriptTools for now
309316
->Array.filter(f => !String.startsWith(f, "Js") && !String.startsWith(f, "RescriptTools"))
310317
->Array.filter(f => f->String.endsWith(".res") || f->String.endsWith(".resi"))
311-
// ->Array.filter(f => f === "String.resi")
318+
->Array.filter(f => f === "Uint8ClampedArray.res")
312319
->Array.reduce([], (acc, cur) => {
313320
let isInterface = cur->String.endsWith(".resi")
314321

tests/docstrings_examples/DocTest.res.mjs

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,12 @@ async function runtimeTests(code) {
122122
let exitCode = match.code;
123123
let stderr = match.stderr;
124124
let stdout = match.stdout;
125+
console.log({
126+
code: code,
127+
exitCode: exitCode,
128+
stdout: stdout,
129+
stderr: stderr
130+
});
125131
let std;
126132
let exit = 0;
127133
if (exitCode !== null) {
@@ -183,7 +189,7 @@ function extractDocFromFile(file) {
183189
RE_EXN_ID: "Assert_failure",
184190
_1: [
185191
"DocTest.res",
186-
199,
192+
206,
187193
9
188194
],
189195
Error: new Error()
@@ -351,7 +357,7 @@ async function main() {
351357
} else {
352358
return f.endsWith(".resi");
353359
}
354-
}), [], (acc, cur) => {
360+
}).filter(f => f === "Uint8ClampedArray.res"), [], (acc, cur) => {
355361
let isInterface = cur.endsWith(".resi");
356362
let resi = Path.join("runtime", cur + "i");
357363
if (!isInterface && Fs.existsSync(resi)) {

0 commit comments

Comments
 (0)