{"id":17816289,"url":"https://github.com/dgellow/tesuto","last_synced_at":"2025-04-02T08:25:40.218Z","repository":{"id":35945873,"uuid":"40234982","full_name":"dgellow/tesuto","owner":"dgellow","description":"✅ Tiny node/typescript library for test reporting","archived":false,"fork":false,"pushed_at":"2020-04-13T19:04:50.000Z","size":108,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-26T22:06:57.367Z","etag":null,"topics":["lightweight","minimalist","test","test-reporting","testing","typescript"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dgellow.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-08-05T08:50:32.000Z","updated_at":"2020-04-10T17:11:37.000Z","dependencies_parsed_at":"2022-09-17T03:22:43.386Z","dependency_job_id":null,"html_url":"https://github.com/dgellow/tesuto","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dgellow%2Ftesuto","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dgellow%2Ftesuto/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dgellow%2Ftesuto/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dgellow%2Ftesuto/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dgellow","download_url":"https://codeload.github.com/dgellow/tesuto/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246779736,"owners_count":20832445,"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":["lightweight","minimalist","test","test-reporting","testing","typescript"],"created_at":"2024-10-27T16:37:03.162Z","updated_at":"2025-04-02T08:25:40.198Z","avatar_url":"https://github.com/dgellow.png","language":"TypeScript","readme":"[![Build Status](https://travis-ci.org/dgellow/tesuto.svg)](https://travis-ci.org/dgellow/tesuto) [![npm version](https://badge.fury.io/js/tesuto.svg)](https://badge.fury.io/js/tesuto)\n\n![tesuto logo](http://i.imgur.com/orh29FB.png)\n\n# tesuto\n\nA really tiny test reporting library with [one unique dependency](https://github.com/dgellow/neocolor/).\n\n```\n$ yarn add --dev tesuto\n\n$ npm install --save-dev tesuto\n```\n\n\u003cimg src=\"assets/screenshot.png\" width=\"700\"\u003e\n\n## Usage\n\n```typescript\nimport assert from \"assert\"\nimport {testing, report, result} from \"tesuto\"\n\nfunction add (x, y) {\n  return x + y\n}\n\n// Report a test\nreport(\"add numbers\", function () {\n  assert.equal(add(1, 2), 3)\n  assert.equal(add(2, 2), 4)\n})\n\n// Define a group of tests\ntesting(\"add function\", function () {\n  report(\"when first arg is a string, concatenate\", function () {\n    assert.equal(add(\"hello_\", \"you\"), \"hello_you\")\n    assert.equal(add(\"hello_\", 2), \"hello_2\")\n  })\n\n  // Groups can be nested\n  testing(\"with numbers\", function() {\n    report(\"should be associative\", function () {\n      assert.equal(add(1, 2), 3)\n      assert.equal(add(2, 1), 3)\n    })\n\n    report(\"should support negative numbers\", function () {\n      assert.equal(add(-1, -2), -3)\n      assert.equal(add(1, -2), -1)\n    })\n  })\n})\n\nresult()\n```\n\n## API\n### `report`, define a test\n\n```typescript\nreport(\"add numbers\", function () {\n  assert.equal(add(1, 2), 3)\n  assert.equal(add(2, 2), 4)\n})\n```\n\n### `testing`, define a group of tests\n\n\u003e Note: Groups can be nested\n\n```typescript\ntesting(\"add function\", function () {\n  report(\"when first arg is a string, concatenate\", function () {\n    assert.equal(add(\"hello_\", \"you\"), \"hello_you\")\n    assert.equal(add(\"hello_\", 2), \"hello_2\")\n  })\n})\n```\n\n### `result`, print statistics\n\n```typescript\nresult()\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdgellow%2Ftesuto","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdgellow%2Ftesuto","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdgellow%2Ftesuto/lists"}