1
1
local eq = MiniTest .expect .equality
2
- -- local neq = MiniTest.expect.no_equality
3
- -- local u = require("tests.utils")
4
- local expect_error = MiniTest .expect .error
5
2
local child = MiniTest .new_child_neovim ()
3
+ -- local env = require("tests.env")
6
4
7
5
local T = MiniTest .new_set ({
8
6
hooks = {
9
7
pre_case = function ()
10
- -- Restart child process with custom 'init.lua' script
11
8
child .restart ({ " -u" , " tests/scripts/minimal_init.lua" })
12
9
child .lua ([[ M = require('copilot')]] )
13
-
14
10
child .lua ([[ c = require('copilot.command')]] )
15
- -- child.lua([[c.enable()]])
16
- -- child.lua([[c.attach({ force = true })]])
17
- -- child.lua([[conf = require('copilot.config')]])
18
11
child .lua ([[ s = require('copilot.status')]] )
12
+ -- child.fn.setenv("GITHUB_COPILOT_TOKEN", env.COPILOT_TOKEN)
19
13
end ,
20
- -- Stop once all test cases are finished
21
14
post_once = child .stop ,
22
15
},
23
16
})
@@ -42,11 +35,4 @@ T["lua()"]["setup called, copilot.setup_done is true"] = function()
42
35
eq (child .lua (" return M.setup_done" ), true )
43
36
end
44
37
45
- T [" lua()" ][" Copilot status, not initialized, returns error" ] = function ()
46
- run_setup ()
47
- expect_error (function ()
48
- child .cmd (" :Copilot status" )
49
- end , " .*not initialized.*" )
50
- end
51
-
52
38
return T
0 commit comments