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

Plenary busted tests don't trigger autocommands #617

Open
karb94 opened this issue Sep 2, 2024 · 0 comments
Open

Plenary busted tests don't trigger autocommands #617

karb94 opened this issue Sep 2, 2024 · 0 comments

Comments

@karb94
Copy link

karb94 commented Sep 2, 2024

I am trying to create tests involving autocommands but I have not been able to trigger any autocommand within the tests. For example, the below test will not fail because the autocommand will not be triggered.

describe("Autocommand triggered: ", function()
  it('VimEnter', function()
    vim.api.nvim_create_autocmd({'VimEnter'}, {
    callback = function()
      print('TRIGGERED')
      assert.equals(0, 1)
    end})
  end)
end

I have tried a few different events without success. Am I doing something wrong or you just can't trigger autocommands in this test environment?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant