deprecated_spec.lua 591 B

12345678910111213141516171819202122
  1. -- Island of misfit toys.
  2. --- @diagnostic disable: deprecated
  3. local t = require('test.testutil')
  4. local n = require('test.functional.testnvim')()
  5. describe('deprecated', function()
  6. before_each(n.clear)
  7. describe('nvim_notify', function()
  8. it('can notify a info message', function()
  9. n.api.nvim_notify('hello world', 2, {})
  10. end)
  11. it('can be overridden', function()
  12. n.command('lua vim.notify = function(...) return 42 end')
  13. t.eq(42, n.api.nvim_exec_lua("return vim.notify('Hello world')", {}))
  14. n.api.nvim_notify('hello world', 4, {})
  15. end)
  16. end)
  17. end)