Skip to content
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

Make optional printing spec name before running #411

Closed
dansdantas opened this issue Nov 13, 2019 · 3 comments
Closed

Make optional printing spec name before running #411

dansdantas opened this issue Nov 13, 2019 · 3 comments

Comments

@dansdantas
Copy link

Just like clearing screen before running any spec, is there any way to not printing the spec name?

Thanks for your hard work!

@codeinabox
Copy link
Collaborator

Thank you. Are you referring to a particular test framework or strategy where this happens?

@dansdantas
Copy link
Author

I am using vimux on rails rspec tests.

I don't know much about vim but from what i understood, it calls this method on strategy.vim

function! test#strategy#vimux(cmd) abort
  if exists('g:test#preserve_screen') && !g:test#preserve_screen
    if exists('g:VimuxRunnerIndex') && _VimuxHasRunner(g:VimuxRunnerIndex) != -1
      call VimuxRunCommand(!s:Windows() ? 'clear' : 'cls')
      call VimuxClearRunnerHistory()
    endif
    call VimuxRunCommand(s:command(a:cmd))
  else
    call VimuxRunCommand(s:pretty_command(a:cmd))
  endif
endfunction

and i end up on the else part that calls pretty_command and ends calling echo on terminal.

I "fixed" by disabling both test#preserve_screen and g:VimuxRunnerIndex (making less than 1), but i don't know if this is correct.

@janko
Copy link
Member

janko commented Nov 15, 2019

Yes, printing commands is not framework-specific, it's implemented on the strategies level, I think it's applied to most strategies. I would probably be useful to have a separate configuration option (e.g. test#echo_command, that can be set to 0) for disabling printing.

If you agree with that, I'd welcome a PR (I don't have time to make one myself unfortunately).

alexgenco added a commit to alexgenco/vim-test that referenced this issue Mar 30, 2021
This allows users to disable echoing the test command before running it.

Resolves vim-test#411
alexgenco added a commit to alexgenco/vim-test that referenced this issue Apr 4, 2021
This allows users to disable echoing the test command before running it.

Resolves vim-test#411
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants