{"id":13496122,"url":"https://github.com/lunarmodules/busted","last_synced_at":"2025-12-17T14:17:02.368Z","repository":{"id":4215081,"uuid":"5336227","full_name":"lunarmodules/busted","owner":"lunarmodules","description":"Elegant Lua unit testing.","archived":false,"fork":false,"pushed_at":"2024-11-29T21:32:31.000Z","size":1888,"stargazers_count":1573,"open_issues_count":60,"forks_count":195,"subscribers_count":36,"default_branch":"master","last_synced_at":"2025-12-11T05:25:28.861Z","etag":null,"topics":["lua","testing"],"latest_commit_sha":null,"homepage":"https://lunarmodules.github.io/busted/","language":"Lua","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/lunarmodules.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2012-08-08T02:28:22.000Z","updated_at":"2025-12-07T06:47:34.000Z","dependencies_parsed_at":"2023-07-05T19:03:11.501Z","dependency_job_id":"54336bb8-9d5b-435e-b34c-540152d089e0","html_url":"https://github.com/lunarmodules/busted","commit_stats":{"total_commits":781,"total_committers":77,"mean_commits":"10.142857142857142","dds":0.709346991037132,"last_synced_commit":"a144124839f027a2d0a95791936c478d047126fc"},"previous_names":["olivine-labs/busted"],"tags_count":38,"template":false,"template_full_name":null,"purl":"pkg:github/lunarmodules/busted","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lunarmodules%2Fbusted","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lunarmodules%2Fbusted/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lunarmodules%2Fbusted/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lunarmodules%2Fbusted/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lunarmodules","download_url":"https://codeload.github.com/lunarmodules/busted/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lunarmodules%2Fbusted/sbom","scorecard":{"id":104517,"data":{"date":"2025-08-04","repo":{"name":"github.com/lunarmodules/busted","commit":"a144124839f027a2d0a95791936c478d047126fc"},"scorecard":{"version":"v5.2.1-28-gc1d103a9","commit":"c1d103a9bb9f635ec7260bf9aa0699466fa4be0e"},"score":4.1,"checks":[{"name":"Code-Review","score":7,"reason":"Found 18/24 approved changesets -- score normalized to 7","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/c1d103a9bb9f635ec7260bf9aa0699466fa4be0e/docs/checks.md#code-review"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/c1d103a9bb9f635ec7260bf9aa0699466fa4be0e/docs/checks.md#packaging"}},{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/c1d103a9bb9f635ec7260bf9aa0699466fa4be0e/docs/checks.md#dangerous-workflow"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/c1d103a9bb9f635ec7260bf9aa0699466fa4be0e/docs/checks.md#maintained"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/c1d103a9bb9f635ec7260bf9aa0699466fa4be0e/docs/checks.md#binary-artifacts"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/busted.yml:1","Warn: no topLevel permission defined: .github/workflows/deploy.yml:1","Warn: no topLevel permission defined: .github/workflows/luacheck.yml:1","Warn: no topLevel permission defined: .github/workflows/versioning.yml:1","Info: no jobLevel write permissions found"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/c1d103a9bb9f635ec7260bf9aa0699466fa4be0e/docs/checks.md#token-permissions"}},{"name":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/busted.yml:29: update your workflow using https://app.stepsecurity.io/secureworkflow/lunarmodules/busted/busted.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/busted.yml:32: update your workflow using https://app.stepsecurity.io/secureworkflow/lunarmodules/busted/busted.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/busted.yml:37: update your workflow using https://app.stepsecurity.io/secureworkflow/lunarmodules/busted/busted.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/deploy.yml:8: update your workflow using https://app.stepsecurity.io/secureworkflow/lunarmodules/busted/deploy.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/deploy.yml:13: update your workflow using https://app.stepsecurity.io/secureworkflow/lunarmodules/busted/deploy.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/deploy.yml:30: update your workflow using https://app.stepsecurity.io/secureworkflow/lunarmodules/busted/deploy.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/deploy.yml:42: update your workflow using https://app.stepsecurity.io/secureworkflow/lunarmodules/busted/deploy.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/luacheck.yml:11: update your workflow using https://app.stepsecurity.io/secureworkflow/lunarmodules/busted/luacheck.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/luacheck.yml:13: update your workflow using https://app.stepsecurity.io/secureworkflow/lunarmodules/busted/luacheck.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/versioning.yml:12: update your workflow using https://app.stepsecurity.io/secureworkflow/lunarmodules/busted/versioning.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/versioning.yml:14: update your workflow using https://app.stepsecurity.io/secureworkflow/lunarmodules/busted/versioning.yml/master?enable=pin","Warn: containerImage not pinned by hash: Dockerfile:3","Warn: containerImage not pinned by hash: Dockerfile:14","Info:   0 out of   3 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   8 third-party GitHubAction dependencies pinned","Info:   0 out of   2 containerImage dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/c1d103a9bb9f635ec7260bf9aa0699466fa4be0e/docs/checks.md#pinned-dependencies"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/c1d103a9bb9f635ec7260bf9aa0699466fa4be0e/docs/checks.md#cii-best-practices"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/c1d103a9bb9f635ec7260bf9aa0699466fa4be0e/docs/checks.md#vulnerabilities"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/c1d103a9bb9f635ec7260bf9aa0699466fa4be0e/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/c1d103a9bb9f635ec7260bf9aa0699466fa4be0e/docs/checks.md#license"}},{"name":"Signed-Releases","score":0,"reason":"Project has not signed or included provenance with any releases.","details":["Warn: release artifact v2.2.0 not signed: https://api.github.com/repos/lunarmodules/busted/releases/128120617","Warn: release artifact v2.1.1 not signed: https://api.github.com/repos/lunarmodules/busted/releases/75233907","Warn: release artifact v2.1.0 not signed: https://api.github.com/repos/lunarmodules/busted/releases/75232675","Warn: release artifact v2.2.0 does not have provenance: https://api.github.com/repos/lunarmodules/busted/releases/128120617","Warn: release artifact v2.1.1 does not have provenance: https://api.github.com/repos/lunarmodules/busted/releases/75233907","Warn: release artifact v2.1.0 does not have provenance: https://api.github.com/repos/lunarmodules/busted/releases/75232675"],"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/c1d103a9bb9f635ec7260bf9aa0699466fa4be0e/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":-1,"reason":"internal error: error during branchesHandler.setup: internal error: githubv4.Query: Resource not accessible by integration","details":null,"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/c1d103a9bb9f635ec7260bf9aa0699466fa4be0e/docs/checks.md#branch-protection"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/c1d103a9bb9f635ec7260bf9aa0699466fa4be0e/docs/checks.md#security-policy"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 25 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/c1d103a9bb9f635ec7260bf9aa0699466fa4be0e/docs/checks.md#sast"}}]},"last_synced_at":"2025-08-15T10:51:10.999Z","repository_id":4215081,"created_at":"2025-08-15T10:51:10.999Z","updated_at":"2025-08-15T10:51:10.999Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":27660923,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-12-11T02:00:11.302Z","response_time":56,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["lua","testing"],"created_at":"2024-07-31T19:01:42.609Z","updated_at":"2025-12-17T14:17:02.341Z","avatar_url":"https://github.com/lunarmodules.png","language":"Lua","readme":"busted\n======\n\n[![Join the chat at https://gitter.im/lunarmodules/busted](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/lunarmodules/busted?utm_source=badge\u0026utm_medium=badge\u0026utm_campaign=pr-badge\u0026utm_content=badge)\n\n[![Busted](https://img.shields.io/github/actions/workflow/status/lunarmodules/busted/busted.yml?label=Busted\u0026logo=Lua)](https://github.com/lunarmodules/busted/actions?workflow=Busted)\n[![Luacheck](https://img.shields.io/github/actions/workflow/status/lunarmodules/busted/luacheck.yml?label=Luacheck\u0026logo=Lua)](https://github.com/lunarmodules/busted/actions?workflow=Luacheck)\n[![GitHub tag (latest SemVer)](https://img.shields.io/github/v/tag/lunarmodules/busted?label=Tag\u0026logo=GitHub)](https://github.com/lunarmodules/busted/releases)\n[![Luarocks](https://img.shields.io/luarocks/v/lunarmodules/busted?label=Luarocks\u0026logo=Lua)](https://luarocks.org/modules/lunarmodules/busted)\n\n\nbusted is a unit testing framework with a focus on being **easy to\nuse**. Supports Lua \u003e= 5.1, luajit \u003e= 2.0.0, and moonscript.\n\nCheck out the [official docs](https://lunarmodules.github.io/busted/) for\nextended info.\n\nbusted test specs read naturally without being too verbose. You can even\nchain asserts and negations, such as `assert.is_not.equal`. Nest blocks of\ntests with contextual descriptions using `describe`, and add tags to\nblocks so you can run arbitrary groups of tests.\n\nAn extensible assert library allows you to extend and craft your own\nassert functions specific to your case with method chaining. A modular\noutput library lets you add on your own output format, along with the\ndefault pretty and plain terminal output, JSON with and without\nstreaming, and TAP-compatible output that allows you to run busted specs\nwithin most CI servers.\n\n```lua\ndescribe('Busted unit testing framework', function()\n  describe('should be awesome', function()\n    it('should be easy to use', function()\n      assert.truthy('Yup.')\n    end)\n\n    it('should have lots of features', function()\n      -- deep check comparisons!\n      assert.same({ table = 'great'}, { table = 'great' })\n\n      -- or check by reference!\n      assert.is_not.equals({ table = 'great'}, { table = 'great'})\n\n      assert.falsy(nil)\n      assert.error(function() error('Wat') end)\n    end)\n\n    it('should provide some shortcuts to common functions', function()\n      assert.unique({{ thing = 1 }, { thing = 2 }, { thing = 3 }})\n    end)\n\n    it('should have mocks and spies for functional tests', function()\n      local thing = require('thing_module')\n      spy.on(thing, 'greet')\n      thing.greet('Hi!')\n\n      assert.spy(thing.greet).was.called()\n      assert.spy(thing.greet).was.called_with('Hi!')\n    end)\n  end)\nend)\n```\n\nContributing\n------------\n\nSee [CONTRIBUTING.md](https://github.com/lunarmodules/busted/blob/master/CONTRIBUTING.md).\nAll issues, suggestions, and most importantly pull requests are welcome.\n\nTesting\n-------\n\nAssuming you have luarocks installed:\n\nInstall these dependencies for core testing:\n\n```\nluarocks install moonscript\n```\n\nThen to reinstall and run tests:\n\n```\nluarocks remove busted --force\nluarocks make\nbusted spec\n```\n\nDocker\n------\n\nAlternatively Busted can be run as a standalone docker container.\nThis approach is somewhat limited because many projects will require extra dependencies which will need to be installed inside the Docker container.\nLuarocks is provided in the container so many dependencies can be added.\nThe images are based on Alpine Linux so you can also use `apk add` to install system dependencies if needed.\nThe Docker use case is probably most advantageous for pure-Lua projects with no dependencies: i.g. small libraries not large apps.\n\nThe usage of docker is fairly simple.\nYou can either build your own or download a prebuilt version.\nTo build your own, execute the following command from the source directory of this project:\n\n```console\n$ docker build -t ghcr.io/lunarmodules/busted:HEAD .\n```\n\nTo use a prebuilt one, download it from the GitHub Container Registry.\nHere we use the one tagged *latest*, but you can substitute *latest* for any tagged release.\n\n```console\n$ docker pull ghcr.io/lunarmodules/busted:latest\n```\n\nOnce you have a container you can run it on one file or a source tree (substitute *latest* with *HEAD* if you built your own or with the tagged version you want if applicable):\n\n```console\n# Run on an entire project\n$ docker run -v \"$(pwd):/data\" ghcr.io/lunarmodules/busted:latest\n\n# Run on one directory:\n$ docker run -v \"$(pwd):/data\" ghcr.io/lunarmodules/busted:latest specs\n```\n\nA less verbose way to run it in most shells is with at alias:\n\n```console\n# In a shell or in your shell's RC file:\n$ alias busted='docker run -v \"$(pwd):/data\" ghcr.io/lunarmodules/busted:latest'\n\n# Thereafter just run:\n$ busted\n```\n### Use as a CI job\n\nThere are actually many ways to run Busted remotely as part of a CI work flow.\nBecause packages are available for many platforms, one way would be to just use your platforms native package installation system to pull them into whatever CI runner environment you already use.\nAnother way is to pull in the prebuilt Docker container and run that.\n\nAs a case study, here is how a workflow could be setup in GitHub Actions:\n\n```yaml\nname: Busted\non: [push, pull_request]\njobs:\n  sile:\n    runs-on: ubuntu-latest\n    steps:\n      - name: Checkout\n        uses: actions/checkout@v3\n      - name: Run Busted\n        uses: lunarmodules/busted@v0\n```\n\nBy default the GH Action is configured to run `busted --verbose`, but you can also pass it your own `args` to replace the default input of `.`.\n\n```yaml\n      - name: Run Busted\n        uses: lunarmodules/busted@v0\n        with:\n            args: --tags=MYTAGS\n```\n\nLicense\n-------\n\nCopyright 2012-2020 Olivine Labs, LLC.\nMIT licensed. See [LICENSE for details](https://github.com/lunarmodules/busted/blob/master/LICENSE).\n","funding_links":[],"categories":["Lua","Libraries","Testing"],"sub_categories":["Programming Language"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flunarmodules%2Fbusted","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flunarmodules%2Fbusted","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flunarmodules%2Fbusted/lists"}