-
Notifications
You must be signed in to change notification settings - Fork 15
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
Nothing happens on Ultest* commands #41
Comments
@rcarriga anything that you might be able to tell from this log? Happy to try to setup a repro otherwise. |
Assuming you're reliably reproducing the logs, it looks like the file name is being inconsistently used |
Hmm, this sadly does not seem to change anything. |
OK I can't really debug any further without something to reproduce. If you can replicate with a simple dummy file that'd be brilliant |
I have a similar problem with junit test The log for
|
Found in java test patterns. Mentioned in #41
@yacut This is a different problem. Try with the latest commit, I believe I have fixed the issue. If not, please open a separate issue. |
@VVKot Following up, I've taken a look at your dotfiles and found these functions wrap vim-test commands local call_with_test_directory_as_cwd = function(command)
local cwd = vim.api.nvim_eval("getcwd()")
vim.o.autochdir = true
last_test_cwd = vim.api.nvim_eval("getcwd()")
vim.api.nvim_command(command)
vim.o.autochdir = false
vim.api.nvim_command("cd " .. cwd)
end
local call_with_last_test_cwd = function(command)
local cwd = vim.api.nvim_eval("getcwd()")
vim.api.nvim_command("cd " .. last_test_cwd)
vim.api.nvim_command(command)
vim.api.nvim_command("cd " .. cwd)
end Can you explain what these are for? As they're not standard vim-test functionality I would imagine this is why vim-ultest is not working |
@rcarriga sure, they basically set up correct cwd for tests to run. See longer explanation here: vim-test/vim-test#209 (comment). However, even if I don't use this commands and just use raw vim-test commands instead, my tests do run (they'd fail at runtime because they will execute Typescript, not compiled Javascript). However, running Ultest commands directly does not do anything. It seems that discovery of the tests works correctly, however, then we don't find those tests relative to the current position in the file:
...
Sorry, haven't gotten to setting up a repro yet. |
Ah OK thanks for the info! I'll wait for a reproduction so 😄 |
I'm having the same issue, I can run vim-test commands but no Ultest commands here's my logs:
|
@nathani-axis This looks like a separate issue. It looks like vim-test is either not installed or not loaded. Are you lazy loading it? |
You're right, this was my vim-test plugin installation
I've removed the |
I seem to have a similar issue, also with
Again, |
I get the same issue too, different from the previous issue I commented for in this thread. I have a go project in which I have tests, and the go project root is the same as the git project root. In this project, Ultest finds the tests and is able to run them without any issues.
I have a second go project in which I have tests, and the go project root is NOT the same as the git project root. In this project Ultest finds the tests (I can see them in the summary) but is not able to run them at all. Nothing happens when running Ultest at all. In this project nvim is able to move the CWD to the right root, for example if I'm in a go file, it moves it to ./project/ where my go.mod is.
I first ran UltestNearest, and then just Ultest in my test file.
The file I'm testing Ultest on has only one test. |
Introduces a few changes to better handle the directory changing using the :cd command. - Use absolute file paths to track files rather than relative. - Deleting old summary window as it doesn't get opened with edit command after cd despite being `nofile` type - Updating summary window on DirChanged - Using relative file paths in summary window See #41
@nathani-axis @augustebaum Can you try with the latest commit? |
Same here. Vim-test runs and Ultest does nothing. Typescript with Jest. |
Very similar to #21.
Describe the bug
Nothing happens when running Ultest* commands. Tests are seemingly detected fine (they show up in UltestSummary tree), however, they are not actually running. I am in Typescript test file, using Jest.
:TestFile
from vim-test runs succesfully.Logs should be created using
ULTEST_LOG_LEVEL=DEBUG ULTEST_LOG_FILE=vim-ultest.log nvim <test-file>
and added here as well:21:33:00 | INFO | MainThread | logging.py:create_logger:98 | Logger created
21:33:00 | DEBUG | MainThread | init.py:init:41 | Handler created
21:33:01 | DEBUG | Thread-1 | init.py:_handle_coroutine:57 | Starting job with group update_positions
21:33:01 | INFO | Thread-1 | tracker.py:_async_update:52 | Updating positions in /path/to/bar.test.ts
21:33:01 | DEBUG | Thread-1 | file.py:parse_file_structure:22 | Converted pattern {'test': ['\v^\s*%(it|test)\s*[( ]\s*%("|'|
)(.*)%("|\'|
)'], 'namespace': ['\v^\s*%(describe|suite|context)\s*[( ]\s*%("|'|)(.*)%("|\'|
)']} to {'test': [re.compile('^\s*(?:it|test)\s*[( ]\s*(?:"|'|)(.*)(?:"|\'|
)')], 'namespace': [re.compile('^\s*(?:describe|suite|context)\s*[( ]\s*(?:"|'|)(.*)(?:"|\'|
)')]}21:33:01 | DEBUG | Thread-1 | tracker.py:_async_update:79 | New test /path/to/bar.test.ts found in /path/to/bar.test.ts
21:33:01 | DEBUG | Thread-1 | tracker.py:_async_update:79 | New test bar5117784500479910972 found in /path/to/bar.test.ts
21:33:01 | DEBUG | Thread-1 | tracker.py:_async_update:79 | New test foo0 found in /path/to/bar.test.ts
21:33:01 | DEBUG | Thread-1 | tracker.py:_async_update:79 | New test foo1 found in /path/to/bar.test.ts
21:33:01 | DEBUG | Thread-1 | tracker.py:_async_update:79 | New test foo2 found in /path/to/bar.test.ts
21:33:01 | DEBUG | Thread-1 | tracker.py:_async_update:79 | New test foo3 found in /path/to/bar.test.ts
21:33:01 | DEBUG | Thread-1 | tracker.py:_async_update:79 | New test foo4 found in /path/to/bar.test.ts
21:33:01 | DEBUG | Thread-1 | tracker.py:_async_update:79 | New test foo5 found in /path/to/bar.test.ts
21:33:01 | DEBUG | Thread-1 | tracker.py:_async_update:79 | New test foo6 found in /path/to/bar.test.ts
21:33:01 | DEBUG | Thread-1 | tracker.py:_async_update:79 | New test foo7 found in /path/to/bar.test.ts
21:33:01 | DEBUG | Thread-1 | tracker.py:_async_update:79 | New test foo8 found in /path/to/bar.test.ts
21:33:01 | DEBUG | Thread-1 | tracker.py:_remove_old_positions:122 | No tests removed
21:33:01 | DEBUG | Thread-1 | init.py:_handle_coroutine:77 | Finished job with group update_positions
21:33:17 | INFO | MainThread | init.py:run_nearest:125 | Running nearest test in bar.test.ts at line 0
21:33:17 | INFO | MainThread | init.py:run_nearest:129 | No tests found for bar.test.ts rerunning after processing positions
To Reproduce
See above
Expected behavior
Tests actually run
Screenshots
None
Additional context
:checkhealth
does not show any problems, remote plugins are up-to-date, Python3 and pynvim are available (I am also using UltiSnips which need Python and are functioning fine).The text was updated successfully, but these errors were encountered: