@@ -111,17 +111,17 @@ T["get_execute_command()"]["default node command, default server path"] = functi
111
111
local nodejs = require (" copilot.lsp.nodejs" )
112
112
eq (nodejs .setup (), true )
113
113
local cmd = nodejs .get_execute_command ()
114
- eq (cmd , { " node" , stub .default_server_path , " --stdio" })
114
+ eq (cmd , { " node" , vim . fn . expand ( stub .default_server_path ) , " --stdio" })
115
115
end )
116
116
eq (captured_path , stub .default_server_path )
117
117
end
118
118
119
119
T [" get_execute_command()" ][" default node command, custom server path" ] = function ()
120
120
stub .get_runtime_server_path (function ()
121
121
local nodejs = require (" copilot.lsp.nodejs" )
122
- eq (nodejs .setup (nil , stub .custom_server_path ), true )
122
+ eq (nodejs .setup (nil , vim . fn . expand ( stub .custom_server_path ) ), true )
123
123
local cmd = nodejs .get_execute_command ()
124
- eq (cmd , { " node" , stub .custom_server_path , " --stdio" })
124
+ eq (cmd , { " node" , vim . fn . expand ( stub .custom_server_path ) , " --stdio" })
125
125
end )
126
126
end
127
127
@@ -130,7 +130,7 @@ T["get_execute_command()"]["custom node command as string, default server path"]
130
130
local nodejs = require (" copilot.lsp.nodejs" )
131
131
eq (nodejs .setup (" /usr/local/bin/node" ), true )
132
132
local cmd = nodejs .get_execute_command ()
133
- eq (cmd , { " /usr/local/bin/node" , stub .default_server_path , " --stdio" })
133
+ eq (cmd , { " /usr/local/bin/node" , vim . fn . expand ( stub .default_server_path ) , " --stdio" })
134
134
end )
135
135
eq (captured_path , stub .default_server_path )
136
136
end
@@ -149,7 +149,7 @@ T["get_execute_command()"]["custom node command as string with spaces, default s
149
149
local nodejs = require (" copilot.lsp.nodejs" )
150
150
nodejs .setup (" /path to/node" )
151
151
local cmd = nodejs .get_execute_command ()
152
- eq (cmd , { " /path to/node" , stub .default_server_path , " --stdio" })
152
+ eq (cmd , { " /path to/node" , vim . fn . expand ( stub .default_server_path ) , " --stdio" })
153
153
end )
154
154
eq (captured_path , stub .default_server_path )
155
155
end
@@ -168,7 +168,7 @@ T["get_execute_command()"]["custom node command as table, default server path"]
168
168
local nodejs = require (" copilot.lsp.nodejs" )
169
169
nodejs .setup ({ " mise" , " x" , " node@lts" , " --" , " node" })
170
170
local cmd = nodejs .get_execute_command ()
171
- eq (cmd , { " mise" , " x" , " node@lts" , " --" , " node" , stub .default_server_path , " --stdio" })
171
+ eq (cmd , { " mise" , " x" , " node@lts" , " --" , " node" , vim . fn . expand ( stub .default_server_path ) , " --stdio" })
172
172
end )
173
173
eq (captured_path , stub .default_server_path )
174
174
end
0 commit comments