File tree 2 files changed +10
-0
lines changed
2 files changed +10
-0
lines changed Original file line number Diff line number Diff line change 1
1
-- This file should have all functions that are in the public api and either set
2
2
-- or read the state of this source.
3
3
4
+ local nt = require (" neo-tree" )
4
5
local utils = require (" neo-tree.utils" )
5
6
local compat = require (" neo-tree.utils._compat" )
6
7
local fs_scan = require (" neo-tree.sources.filesystem.lib.fs_scan" )
@@ -34,6 +35,7 @@ local get_source_data = function(source_name)
34
35
end
35
36
36
37
local function create_state (tabid , sd , winid )
38
+ nt .ensure_config ()
37
39
local default_config = default_configs [sd .name ]
38
40
local state = vim .deepcopy (default_config , compat .noref ())
39
41
state .tabid = tabid
Original file line number Diff line number Diff line change
1
+ describe (" manager state" , function ()
2
+ it (" can be retrieved at startup" , function ()
3
+ local fs_state = require (" neo-tree.sources.manager" ).get_state (" filesystem" )
4
+ local buffers_state = require (" neo-tree.sources.manager" ).get_state (" buffers" )
5
+ assert .are_equal (type (fs_state ), " table" )
6
+ assert .are_equal (type (buffers_state ), " table" )
7
+ end )
8
+ end )
You can’t perform that action at this time.
0 commit comments