-
-
Notifications
You must be signed in to change notification settings - Fork 66
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
Only run tests via commands #48
Comments
Cross link discussion: #47 (comment) |
The real question is how do we achieve this? |
We should probably add a commands for running all tests. At the moment we only run the tests from the file your in on save. |
We're back to "executing" tests? If so, I think there has to be an opt-out. It takes 15 seconds for a toy project with fuzz tests. A well tested production project might be even worse. There is and should be a big difference between making sure, the test is valid elm syntax, and execution the tests. I'm not sure, but it looks like both is done. Is this correct? Can't really test because of issue file path. See slack :) |
This is the current result:
There is currently no line number or test name. So it's hard to tell which test failed. |
Those are not provided by elm test unfortunately. Best would be to add commands to run these. Until the language server spec implement's something test related. |
It provides the test name as {
"event": "testCompleted",
"status": "fail",
"labels": [
"MainTest",
"Main",
"update",
"Type a word"
],
"failures": [
{
"given": null,
"message": "Expect.equal",
"reason": {
"type": "Equality",
"data": {
"expected": "Buffer \"asd1f\"",
"actual": "Buffer \"asdf\"",
"comparison": "Expect.equal"
}
}
}
],
"duration": "5"
} But I'm also very much in favor of using commands instead for now. |
Command would be:
|
so how would the labels need to be concated to form the name again? |
It looks like the
|
Intersperse the list with |
Added |
Nice. Do you plan to change it to a command instead of on save? |
Probably, but commands are at the moment, what I keep pushing back. |
Yeah, I try to push back executing tests on save, because I won't be able to upgrade then :D Edit: Configuration is another option, of course. |
Which is confusing to me, as this was already included in the last release |
I didn't notice because I didn't write new tests in the last weeks ;) At one point I split up a large test file, because it became unusable. Here is a demo with latest release. It shows, how long it takes to remove/fix a syntax error, because this'll trigger executing the test. Around 20 seconds. The file is already smaller, because I split up the tests, because of lagging at one point. |
I pushed this WIP branch. https://github.com/elm-tooling/elm-language-server/tree/test-commands It has two problems:
So I would basically rip out test support for the moment. |
Hey, didn't have a look at the branch, but regarding 1: Is the assumption holding that the first label is always the module name and can therefore deterministicly converted to file name? Is this the case or are there counter examples? |
No description provided.
The text was updated successfully, but these errors were encountered: