diff --git a/jestronaut-scm-0.rockspec b/jestronaut-scm-0.rockspec index 6d54b87..b3a1b12 100644 --- a/jestronaut-scm-0.rockspec +++ b/jestronaut-scm-0.rockspec @@ -77,6 +77,7 @@ build = { ["jestronaut/mock/mockmodule"] = "libs/jestronaut/mock/mockmodule.lua", ["jestronaut/utils/functions"] = "libs/jestronaut/utils/functions.lua", ["jestronaut/utils/metatables"] = "libs/jestronaut/utils/metatables.lua", + ["jestronaut/utils/require"] = "libs/jestronaut/utils/require.lua", ["jestronaut/utils/strings"] = "libs/jestronaut/utils/strings.lua", ["jestronaut/utils/styledtexts"] = "libs/jestronaut/utils/styledtexts.lua", ["jestronaut/utils/tables"] = "libs/jestronaut/utils/tables.lua", diff --git a/package.json b/package.json index deca0f7..f8ff7aa 100644 --- a/package.json +++ b/package.json @@ -12,7 +12,7 @@ "test": "luvi . -- --roots=./tests/generated --roots=./tests --testPathIgnorePatterns=\"/tests/generated/ExpectAPI/toBeCloseTo.lua$/\" --testPathIgnorePatterns=\"/tests/generated/GlobalAPI/test.lua$/\" --testPathIgnorePatterns=\"/tests/generated/JestObjectAPI/jest/useFakeTimers.lua$/\" --testPathIgnorePatterns=\"/tests/generated/JestObjectAPI/jest/useRealTimers.lua$/\" --testPathIgnorePatterns=\"/tests/generated/JestObjectAPI/jest/retryTimes.lua$/\" --testPathIgnorePatterns=\"/tests/generated/MockFunctionAPI/mockFn/mockName.lua$/\" --testPathIgnorePatterns=\"/tests/generated/GlobalAPI/test/failing.lua$/\" --testPathIgnorePatterns=\"/tests/generated/GlobalAPI/test/failing/each.lua$/\"", "clear-coverage": "rm -rf luacov.stats.out && rm -rf luacov.report.out", "ci:test": "npm run clear-coverage && npm run test -- --coverage=true && luacov -r lcov", - "build:gmod": "node ./scripts/generate-gmod-addon.js --clean", + "build:gmod": "([ -d dist ] || mkdir dist) && node ./scripts/generate-gmod-addon.js --clean", "build:lit": "([ -d dist ] || mkdir dist) && lit make . ./dist/jestronaut", "build": "npm run generate-rockspec && luarocks make --local && npm run build:lit", "ci:publish": "node ./scripts/upload-new-rockspecs.js" diff --git a/rockspecs/jestronaut-0.5-1.rockspec b/rockspecs/jestronaut-0.5-1.rockspec new file mode 100644 index 0000000..9793c58 --- /dev/null +++ b/rockspecs/jestronaut-0.5-1.rockspec @@ -0,0 +1,85 @@ +package = "jestronaut" +version = "0.5-1" +source = { + url = "git+https://github.com/luttje/jestronaut" +} +description = { + summary = "Library for testing your Lua scripts.", + detailed = "A Lua library for testing your scripts. It does for Lua what Jest (https://jestjs.io/) does for JavaScript, with the same API.", + homepage = "https://github.com/luttje/jestronaut", + license = "MIT" +} +dependencies = { + "lua >= 5.1" +} +build = { + type = "builtin", + modules = { + ["jestronaut"] = "libs/jestronaut.lua", + ["jestronaut/coverage"] = "libs/jestronaut/coverage.lua", + ["jestronaut/each"] = "libs/jestronaut/each.lua", + ["jestronaut/environment"] = "libs/jestronaut/environment.lua", + ["jestronaut/expect"] = "libs/jestronaut/expect.lua", + ["jestronaut/mock"] = "libs/jestronaut/mock.lua", + ["jestronaut/reporter"] = "libs/jestronaut/reporter.lua", + ["jestronaut/environment/describe"] = "libs/jestronaut/environment/describe.lua", + ["jestronaut/environment/init"] = "libs/jestronaut/environment/init.lua", + ["jestronaut/environment/options"] = "libs/jestronaut/environment/options.lua", + ["jestronaut/environment/state"] = "libs/jestronaut/environment/state.lua", + ["jestronaut/environment/test"] = "libs/jestronaut/environment/test.lua", + ["jestronaut/expect/init"] = "libs/jestronaut/expect/init.lua", + ["jestronaut/expect/asymmetricmatchers/any"] = "libs/jestronaut/expect/asymmetricmatchers/any.lua", + ["jestronaut/expect/asymmetricmatchers/anything"] = "libs/jestronaut/expect/asymmetricmatchers/anything.lua", + ["jestronaut/expect/asymmetricmatchers/arrayContaining"] = "libs/jestronaut/expect/asymmetricmatchers/arrayContaining.lua", + ["jestronaut/expect/asymmetricmatchers/asymmetricmatcher"] = "libs/jestronaut/expect/asymmetricmatchers/asymmetricmatcher.lua", + ["jestronaut/expect/asymmetricmatchers/closeTo"] = "libs/jestronaut/expect/asymmetricmatchers/closeTo.lua", + ["jestronaut/expect/asymmetricmatchers/objectContaining"] = "libs/jestronaut/expect/asymmetricmatchers/objectContaining.lua", + ["jestronaut/expect/asymmetricmatchers/stringContaining"] = "libs/jestronaut/expect/asymmetricmatchers/stringContaining.lua", + ["jestronaut/expect/asymmetricmatchers/stringMatching"] = "libs/jestronaut/expect/asymmetricmatchers/stringMatching.lua", + ["jestronaut/expect/asymmetricmatchers/varargsMatching"] = "libs/jestronaut/expect/asymmetricmatchers/varargsMatching.lua", + ["jestronaut/expect/matchers/toBe"] = "libs/jestronaut/expect/matchers/toBe.lua", + ["jestronaut/expect/matchers/toBeCloseTo"] = "libs/jestronaut/expect/matchers/toBeCloseTo.lua", + ["jestronaut/expect/matchers/toBeDefined"] = "libs/jestronaut/expect/matchers/toBeDefined.lua", + ["jestronaut/expect/matchers/toBeFalsy"] = "libs/jestronaut/expect/matchers/toBeFalsy.lua", + ["jestronaut/expect/matchers/toBeGreaterThan"] = "libs/jestronaut/expect/matchers/toBeGreaterThan.lua", + ["jestronaut/expect/matchers/toBeGreaterThanOrEqual"] = "libs/jestronaut/expect/matchers/toBeGreaterThanOrEqual.lua", + ["jestronaut/expect/matchers/toBeInstanceOf"] = "libs/jestronaut/expect/matchers/toBeInstanceOf.lua", + ["jestronaut/expect/matchers/toBeLessThan"] = "libs/jestronaut/expect/matchers/toBeLessThan.lua", + ["jestronaut/expect/matchers/toBeLessThanOrEqual"] = "libs/jestronaut/expect/matchers/toBeLessThanOrEqual.lua", + ["jestronaut/expect/matchers/toBeNaN"] = "libs/jestronaut/expect/matchers/toBeNaN.lua", + ["jestronaut/expect/matchers/toBeNil"] = "libs/jestronaut/expect/matchers/toBeNil.lua", + ["jestronaut/expect/matchers/toBeNull"] = "libs/jestronaut/expect/matchers/toBeNull.lua", + ["jestronaut/expect/matchers/toBeTruthy"] = "libs/jestronaut/expect/matchers/toBeTruthy.lua", + ["jestronaut/expect/matchers/toBeType"] = "libs/jestronaut/expect/matchers/toBeType.lua", + ["jestronaut/expect/matchers/toBeUndefined"] = "libs/jestronaut/expect/matchers/toBeUndefined.lua", + ["jestronaut/expect/matchers/toContain"] = "libs/jestronaut/expect/matchers/toContain.lua", + ["jestronaut/expect/matchers/toContainEqual"] = "libs/jestronaut/expect/matchers/toContainEqual.lua", + ["jestronaut/expect/matchers/toEqual"] = "libs/jestronaut/expect/matchers/toEqual.lua", + ["jestronaut/expect/matchers/toHaveBeenCalled"] = "libs/jestronaut/expect/matchers/toHaveBeenCalled.lua", + ["jestronaut/expect/matchers/toHaveBeenCalledTimes"] = "libs/jestronaut/expect/matchers/toHaveBeenCalledTimes.lua", + ["jestronaut/expect/matchers/toHaveBeenCalledWith"] = "libs/jestronaut/expect/matchers/toHaveBeenCalledWith.lua", + ["jestronaut/expect/matchers/toHaveBeenLastCalledWith"] = "libs/jestronaut/expect/matchers/toHaveBeenLastCalledWith.lua", + ["jestronaut/expect/matchers/toHaveBeenNthCalledWith"] = "libs/jestronaut/expect/matchers/toHaveBeenNthCalledWith.lua", + ["jestronaut/expect/matchers/toHaveLastReturnedWith"] = "libs/jestronaut/expect/matchers/toHaveLastReturnedWith.lua", + ["jestronaut/expect/matchers/toHaveLength"] = "libs/jestronaut/expect/matchers/toHaveLength.lua", + ["jestronaut/expect/matchers/toHaveNthReturnedWith"] = "libs/jestronaut/expect/matchers/toHaveNthReturnedWith.lua", + ["jestronaut/expect/matchers/toHaveProperty"] = "libs/jestronaut/expect/matchers/toHaveProperty.lua", + ["jestronaut/expect/matchers/toHaveReturned"] = "libs/jestronaut/expect/matchers/toHaveReturned.lua", + ["jestronaut/expect/matchers/toHaveReturnedTimes"] = "libs/jestronaut/expect/matchers/toHaveReturnedTimes.lua", + ["jestronaut/expect/matchers/toHaveReturnedWith"] = "libs/jestronaut/expect/matchers/toHaveReturnedWith.lua", + ["jestronaut/expect/matchers/toMatch"] = "libs/jestronaut/expect/matchers/toMatch.lua", + ["jestronaut/expect/matchers/toMatchObject"] = "libs/jestronaut/expect/matchers/toMatchObject.lua", + ["jestronaut/expect/matchers/toStrictEqual"] = "libs/jestronaut/expect/matchers/toStrictEqual.lua", + ["jestronaut/expect/matchers/toThrow"] = "libs/jestronaut/expect/matchers/toThrow.lua", + ["jestronaut/expect/matchers/toThrowError"] = "libs/jestronaut/expect/matchers/toThrowError.lua", + ["jestronaut/mock/init"] = "libs/jestronaut/mock/init.lua", + ["jestronaut/mock/mockfunction"] = "libs/jestronaut/mock/mockfunction.lua", + ["jestronaut/mock/mockmodule"] = "libs/jestronaut/mock/mockmodule.lua", + ["jestronaut/utils/functions"] = "libs/jestronaut/utils/functions.lua", + ["jestronaut/utils/metatables"] = "libs/jestronaut/utils/metatables.lua", + ["jestronaut/utils/require"] = "libs/jestronaut/utils/require.lua", + ["jestronaut/utils/strings"] = "libs/jestronaut/utils/strings.lua", + ["jestronaut/utils/styledtexts"] = "libs/jestronaut/utils/styledtexts.lua", + ["jestronaut/utils/tables"] = "libs/jestronaut/utils/tables.lua", + } +}