-
Notifications
You must be signed in to change notification settings - Fork 83
test: add tests for lakefile-toml-schema.json
#694
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
Conversation
ac92269 to
01c4c84
Compare
5a8a10d to
30e55e6
Compare
|
If I'm parsing the logs correctly, CI is failing because the test runner is slow and timing out on a separate test ( |
| // Wait for 5 seconds for diagnostics to appear | ||
| await sleep(5 * 1000) | ||
|
|
||
| const diagnostics = vscode.languages.getDiagnostics().flatMap(([, diagnostic]) => diagnostic) |
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.
I wonder if there is something a little more robust we could do here, like listening for diagnostic changes before opening the document and then using the first set of diagnostics that is reported by even-better-toml (or timing out after 60s), which would rely on the assumption that even-better-toml only reports diagnostics once, but the limitations of the VS Code API ensure that we won't really have a perfectly robust solution here either way.
If the 5s delay works consistently, then I'm fine with it :-)
|
Thanks! Happy to merge if you have no further comments.
The schema has the following goals:
It's more of the latter and less of the former :-) The tests in this repo are not maintained very well, but test breakages here won't be annoying to everyone else working on core.
Yes, the PR is fine. The tests are known to be a little flaky, but I haven't had much time to investigate why. |
|
Yeah no further comments :) |
This pull request adds tests to make sure that lakefile-toml-schema has no false positives and minimal false negatives (or the other way around? Maintainer please confirm/deny).
As discussed in this pull request, tests for the
lakefile.tomlschema are placed here since the tests in this repo are better maintained and this location avoids adding another dependency to the test suite for the main project.