Skip to content

Commit 97cc514

Browse files
test: add setup test for CopilotChat module (#1336)
* test: add setup test for CopilotChat module Added a test to verify that CopilotChat can be set up without errors and that the chat module is initialized. Also updated .luarc.json to include additional globals used in tests. * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
1 parent b479d60 commit 97cc514

2 files changed

Lines changed: 11 additions & 1 deletion

File tree

.luarc.json

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,12 @@
33
"diagnostics.globals": [
44
"describe",
55
"it",
6+
"pending",
67
"before_each",
7-
"after_each"
8+
"after_each",
9+
"clear",
10+
"assert",
11+
"print"
812
],
913
"diagnostics.disable": ["redefined-local"]
1014
}

tests/init_spec.lua

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,10 @@ describe('CopilotChat module', function()
44
require('CopilotChat')
55
end)
66
end)
7+
it('should be able to set up', function()
8+
assert.has_no.errors(function()
9+
require('CopilotChat').setup({})
10+
end)
11+
assert.is_not_nil(require('CopilotChat').chat)
12+
end)
713
end)

0 commit comments

Comments
 (0)