-
Notifications
You must be signed in to change notification settings - Fork 455
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add docstrings compiler tests #7184
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wow, thanks a lot @aspeddro, I had completely overlooked this PR!
Regarding adding assert_eq
to Pervasives, I think we should use follow ReScript naming conventions rather than OCaml naming conventions, i.e., use assertEqual
rather than assert_eq
.
I am also wondering if all those assertions look nice enough in the doc comments / hover help in VS Code, or whether we could maybe separate them somehow so that they are executed in the tests, but not shown in hover help.
Any thoughts on that @zth?
} | ||
) | ||
|
||
let allErros = Array.concat(runtimeErrors, compilationErrors) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
let allErros = Array.concat(runtimeErrors, compilationErrors) | |
let allErrors = Array.concat(runtimeErrors, compilationErrors) |
let runtimeErrors = | ||
(await compiled | ||
->Array.filter((({id}, _, _)) => !Array.includes(ignoreRuntimeTests, id)) | ||
->Array.map(async ((example, rescriptCode, jsCode)) => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If there is too much parallelism here, you might consider a solution like in #7081.
Add tests for docstrings examples
From rescript-lang/rescript-core#184
We can extend this PR to add runtime tests (rescript-lang/rescript-core#210)