55local project = require (' spec.fixtures' ).project
66local helpers = require ' spec.helpers'
77
8+ local infoview = require ' lean.infoview'
9+
810require (' lean' ).setup { infoview = { use_widgets = false } }
911
1012describe (' plain infoviews' , function ()
@@ -413,13 +415,13 @@ describe('plain infoviews', function()
413415 -- end up with the right contents in tests :/
414416 helpers .wait_for_loading_pins ()
415417 vim .wait (10000 , function ()
416- return require ( ' lean. infoview' ) .get_current_infoview ():get_line (1 ) ~= nil
418+ return infoview .get_current_infoview ():get_line (1 ) ~= nil
417419 end )
418420 -- the output in this case has the search path in it, so just match a
419421 -- bit of our expected contents
420422 assert .are .same (
421423 [[ unknown module prefix 'DoesNotExist']] ,
422- require ( ' lean. infoview' ) .get_current_infoview ():get_line (1 )
424+ infoview .get_current_infoview ():get_line (1 )
423425 )
424426 end )
425427 )
@@ -433,10 +435,7 @@ describe('plain infoviews', function()
433435 -- contents in tests :/
434436 helpers .wait_for_loading_pins ()
435437 vim .wait (10000 , function ()
436- return not vim .deep_equal (
437- require (' lean.infoview' ).get_current_infoview ():get_lines (),
438- { ' ' }
439- )
438+ return not vim .deep_equal (infoview .get_current_infoview ():get_lines (), { ' ' })
440439 end )
441440 assert .infoview_contents .are [[
442441 ▼ 1:7-1:10: error:
0 commit comments