diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 9dc001f..840522a 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -2,6 +2,8 @@ name: test on: pull_request: push: + branches: + - main jobs: test: runs-on: ubuntu-latest @@ -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 diff --git a/spec/export_spec.lua b/spec/export_spec.lua index 12638d6..55d3408 100644 --- a/spec/export_spec.lua +++ b/spec/export_spec.lua @@ -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,