Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ name: test
on:
pull_request:
push:
branches:
- main
jobs:
test:
runs-on: ubuntu-latest
Expand All @@ -10,7 +12,7 @@ jobs:
- name: setup lua
run: |
python3 -m pip install hererocks
hererocks -l 5.1 -r 3.5.0 .lua
hererocks -l 5.1 -r 3.5.0 --no-readline .lua
eval $(.lua/bin/luarocks path)
.lua/bin/luarocks install luacheck
.lua/bin/luarocks install busted
Expand Down
29 changes: 12 additions & 17 deletions spec/export_spec.lua
Original file line number Diff line number Diff line change
@@ -1,28 +1,23 @@
describe('export', function()
it('works', function()
local globalenv = {
C_Console = {
GetAllCommands = function()
return {
{ command = 'foo' },
{ command = 'bar' },
{ command = 'baz' },
}
end,
},
ConsoleGetAllCommands = function()
return {
{ command = 'foo' },
{ command = 'bar' },
{ command = 'baz' },
}
end,
C_CVar = {
GetCVarDefault = function(arg)
return 'default_' .. arg
end,
},
CreateFrame = function()
return {
RegisterEvent = function() end,
SetScript = function(_, _, script)
script()
end,
}
end,
C_Timer = {
After = function(_, f)
f()
end,
},
GetBuildInfo = function()
return 1, 2, 3, 4
end,
Expand Down