Skip to content

Plenary busted tests don't trigger autocommands #617

Open

Description

@karb94

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?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions