{"id":13811461,"url":"https://github.com/pyrmont/testament","last_synced_at":"2025-03-10T13:52:49.784Z","repository":{"id":46325862,"uuid":"261872927","full_name":"pyrmont/testament","owner":"pyrmont","description":"A testing library for Janet","archived":false,"fork":false,"pushed_at":"2025-01-08T18:46:41.000Z","size":99,"stargazers_count":30,"open_issues_count":2,"forks_count":8,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-07T03:30:40.687Z","etag":null,"topics":["janet","testing"],"latest_commit_sha":null,"homepage":"","language":"Janet","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/pyrmont.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}},"created_at":"2020-05-06T20:36:22.000Z","updated_at":"2025-01-08T18:46:45.000Z","dependencies_parsed_at":"2024-01-13T15:37:20.007Z","dependency_job_id":"8200fda8-1efd-41ff-b2ab-1a484579c83a","html_url":"https://github.com/pyrmont/testament","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pyrmont%2Ftestament","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pyrmont%2Ftestament/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pyrmont%2Ftestament/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pyrmont%2Ftestament/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pyrmont","download_url":"https://codeload.github.com/pyrmont/testament/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":242864302,"owners_count":20197689,"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":["janet","testing"],"created_at":"2024-08-04T04:00:21.627Z","updated_at":"2025-03-10T13:52:49.767Z","avatar_url":"https://github.com/pyrmont.png","language":"Janet","funding_links":[],"categories":["Testing"],"sub_categories":["Graphics"],"readme":"# Testament\n\n[![Build Status](https://github.com/pyrmont/testament/workflows/build/badge.svg)](https://github.com/pyrmont/testament/actions?query=workflow%3Abuild)\n\nTestament is a testing library for Janet. It takes inspiration Clojure's [clojure.test][] library.\n\n[clojure.test]: https://clojure.github.io/clojure/clojure.test-api.html\n\n## Installation\n\nAdd the dependency to your `project.janet` file:\n\n```janet\n(declare-project\n  :dependencies [\"https://github.com/pyrmont/testament\"])\n```\n\n## Usage\n\nTestament can be used like this:\n\n\n```janet\n(use testament)\n\n(deftest one-plus-one\n  (is (= 2 (+ 1 1)) \"1 + 1 = 2\"))\n\n(deftest two-plus-two\n  (is (= 5 (+ 2 2)) \"2 + 2 = 5\"))\n\n(run-tests!)\n```\n\nPut your tests in the `test/` directory within your project and then run:\n\n```console\n$ jpm test\n```\n\nIf you do the above with a file saved to `test/example.janet`, you should see:\n\n```text\nrunning test/example.janet ...\n\n\u003e Failed: two-plus-two\nAssertion: 2 + 2 = 5\nExpect (L): 5\nActual (R): 4\n\n-----------------------------------\n2 tests run containing 2 assertions\n1 tests passed, 1 tests failed\n-----------------------------------\n```\n\n### In REPLs\n\nTo use Testament in a REPL, set the dynamic variable `:testament-repl?` to\n`true`:\n\n```janet\n(setdyn :testament-repl? true)\n```\n\nThis will (a) stop Testament from exiting your REPL if a test fails, (b) reset\nthe reports between runs and (c) empty the `module/cache` to prevent old code\nfrom running.\n\n\n## API\n\nDocumentation for Testament's API is in [api.md][api].\n\n[api]: https://github.com/pyrmont/testament/blob/master/api.md\n\n## Bugs\n\nFound a bug? I'd love to know about it. The best way is to report your bug in\nthe [Issues][] section on GitHub.\n\n[Issues]: https://github.com/pyrmont/testament/issues\n\n## Licence\n\nTestament is licensed under the MIT Licence. See [LICENSE][] for more details.\n\n[LICENSE]: https://github.com/pyrmont/testament/blob/master/LICENSE\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpyrmont%2Ftestament","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpyrmont%2Ftestament","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpyrmont%2Ftestament/lists"}