Skip to content

Commit

Permalink
Another flailing attempt to get deterministic assertions in a test case.
Browse files Browse the repository at this point in the history
  • Loading branch information
Julian committed Nov 6, 2024
1 parent bc6f4b5 commit dbf9d11
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion spec/infoview/contents_spec.lua
Original file line number Diff line number Diff line change
Expand Up @@ -424,9 +424,15 @@ describe('interactive infoview', function()
it(
'shows diagnostics for files with immediate diagnostics',
helpers.clean_buffer('import DoesNotExist', function()
-- FIXME: This is a bug in `wait_for_loading_pins` (which is already
-- something isn't waiting properly, and nondeterministically we don't
-- end up with the right contents in tests :/
helpers.wait_for_loading_pins()
vim.wait(10000, function()
return not vim.deep_equal(require('lean.infoview').get_current_infoview():get_lines(), {})
end)
-- the output in this case has the search path in it, so just match a
-- bit of our expected contents
helpers.wait_for_loading_pins()
assert.are.same(
[[unknown module prefix 'DoesNotExist']],
require('lean.infoview').get_current_infoview():get_line(1)
Expand Down

0 comments on commit dbf9d11

Please sign in to comment.