{"id":24727189,"url":"https://github.com/sieep-coding/check-your-lua","last_synced_at":"2025-03-22T15:20:23.028Z","repository":{"id":273971245,"uuid":"861498303","full_name":"Sieep-Coding/Check-Your-Lua","owner":"Sieep-Coding","description":" Single-file, minimal Lua testing framework. Portable and easy to run.","archived":false,"fork":false,"pushed_at":"2025-01-24T03:59:22.000Z","size":58,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-24T04:24:14.515Z","etag":null,"topics":["framework","lua","lua-library","testing"],"latest_commit_sha":null,"homepage":"https://sieep-coding.github.io/cyl-docs/","language":"Lua","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"unlicense","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Sieep-Coding.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"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":"2024-09-23T02:40:50.000Z","updated_at":"2025-01-24T03:59:25.000Z","dependencies_parsed_at":"2025-01-24T04:34:16.264Z","dependency_job_id":null,"html_url":"https://github.com/Sieep-Coding/Check-Your-Lua","commit_stats":null,"previous_names":["sieep-coding/check-your-lua"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Sieep-Coding%2FCheck-Your-Lua","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Sieep-Coding%2FCheck-Your-Lua/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Sieep-Coding%2FCheck-Your-Lua/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Sieep-Coding%2FCheck-Your-Lua/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Sieep-Coding","download_url":"https://codeload.github.com/Sieep-Coding/Check-Your-Lua/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244974525,"owners_count":20541142,"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","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":["framework","lua","lua-library","testing"],"created_at":"2025-01-27T14:58:12.164Z","updated_at":"2025-03-22T15:20:22.995Z","avatar_url":"https://github.com/Sieep-Coding.png","language":"Lua","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Check Your Lua 🔎 The Minimal Testing Framework\n\n\u003e [!WARNING]\n\u003e Work in Progress. This library is not ready for usage. ⚠️\n\nA single-file, minimal Lua testing framework designed for simplicity and ease of use.\n\nPortable and easy to run.\n\nAfter trying various testing frameworks, I decided to create my own.\n\n![License: UNLICENSE](https://img.shields.io/badge/License-UNLICENSE-blue.svg)\n\n[![asciicast](https://asciinema.org/a/qz1efJAuVhYQTyzAC40kEQ6OB.svg)](https://asciinema.org/a/qz1efJAuVhYQTyzAC40kEQ6OB)\n\n# Documentation\n\nAccess the documentation [here](https://sieep-coding.github.io/cyl-docs/).\n\nJust drop `checkyour.lua` in your project and then `require` it. \n\nIt will return a table with its functionality.\n\nI will be adding it to [Luarocks](https://luarocks.org/) soon.\n\n### Example\n\n```lua\nlocal checkyourlua = require 'checkyourlua'\nlocal describe, it, expect = checkyourlua.describe, checkyourlua.it, checkyourlua.expect\n\n-- Customize checkyourlua configuration.\ncheckyourlua.show_traceback = false\n\ndescribe('my project', function()\n  checkyourlua.before(function()\n    -- This function is run before every test.\n  end)\n\n  describe('module1', function() -- Describe blocks can be nested.\n    it('feature1', function()\n      expect.equal('something', 'something') -- Pass.\n    end)\n\n    it('feature2', function()\n      expect.truthy(false) -- Fail.\n    end)\n\n    local feature3_test_enabled = false\n    it('feature3', function() -- This test will be skipped.\n      expect.truthy(false) -- Fail.\n    end, feature3_test_enabled)\n  end)\nend)\n\ncheckyourlua.report() -- Print overall statistic of the tests run.\ncheckyourlua.exit() -- Exit with success if all tests passed.\n```\n\n## See It In Action\n\n![](https://github.com/Sieep-Coding/Check-Your-Lua/blob/main/assets/simple.png)\n\n![](https://github.com/Sieep-Coding/Check-Your-Lua/blob/main/assets/passing.png)\n\n![](https://github.com/Sieep-Coding/Check-Your-Lua/blob/main/assets/output.png)\n\n## Features\n\nView the [source file.](https://github.com/Sieep-Coding/Check-Your-Lua/blob/main/checkyour.lua)\n\n- Single file, efficient, and portable.\n- Compatible with Lua 5.1 and above.\n- Zero dependencies for easy integration.\n- Colored output for better readability.\n- Displays execution time and performance metrics.\n- Excellent logging capabilities.\n- Easily run tests using `make` or `bash`.\n- Licensed under the Unlicense for maximum freedom.\n- Extensive [documentation](https://sieep-coding.github.io/cyl-docs/) available.\n\n## Build Instructions\n\n### Makefile\n\n1. **Build the Project**:\n```bash\nmake build\n```\n\n2. **Run Test**:\n ```bash\nmake test\n```\n\n3. **Show Test Coverage**:\n ```bash\nmake coverage\n```\n\n### `run.sh`\n1. **Make Bash Script an Executable**\n```bash   \nchmod +x bash.sh\n```\n2. **Build the Project**:\n```bash\n./run.sh build\n```\n\n3. **Run Test**:\n ```bash\n./run.sh test\n```\n\n4. **Show Test Coverage**:\n ```bash\n./run.sh coverage\n```\n\n## License\n\n[Unlicense](https://github.com/Sieep-Coding/Check-Your-Lua/blob/main/LICENSE)\n\n## Credits\n\nA lot of code is lifted from the [Lester testing framework](https://github.com/edubart/lester).\n\nHats off to them for the original base code I could build upon.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsieep-coding%2Fcheck-your-lua","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsieep-coding%2Fcheck-your-lua","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsieep-coding%2Fcheck-your-lua/lists"}