{"id":16037830,"url":"https://github.com/joseluisq/briefest","last_synced_at":"2025-04-05T05:41:40.129Z","repository":{"id":143865639,"uuid":"243110891","full_name":"joseluisq/briefest","owner":"joseluisq","description":"Small and fast Typescript unit testing library with no dependencies. [WIP]","archived":false,"fork":false,"pushed_at":"2020-02-26T08:18:57.000Z","size":44,"stargazers_count":0,"open_issues_count":2,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-04-22T14:23:11.971Z","etag":null,"topics":["browser","library","nodejs","testing","typescript","unit-testing"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","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/joseluisq.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2020-02-25T21:56:58.000Z","updated_at":"2020-10-27T08:02:52.000Z","dependencies_parsed_at":"2023-10-12T07:15:52.984Z","dependency_job_id":null,"html_url":"https://github.com/joseluisq/briefest","commit_stats":{"total_commits":15,"total_committers":1,"mean_commits":15.0,"dds":0.0,"last_synced_commit":"f6ee78e60f1d2f09072f7815fe415ac4d1f4c0fa"},"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joseluisq%2Fbriefest","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joseluisq%2Fbriefest/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joseluisq%2Fbriefest/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joseluisq%2Fbriefest/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/joseluisq","download_url":"https://codeload.github.com/joseluisq/briefest/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247107827,"owners_count":20884797,"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":["browser","library","nodejs","testing","typescript","unit-testing"],"created_at":"2024-10-08T22:21:42.380Z","updated_at":"2025-04-05T05:41:40.110Z","avatar_url":"https://github.com/joseluisq.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Briefest [![npm](https://img.shields.io/npm/v/briefest.svg)](https://www.npmjs.com/package/briefest) [![npm](https://img.shields.io/npm/dt/briefest.svg)](https://www.npmjs.com/package/briefest) [![Build Status](https://travis-ci.com/joseluisq/briefest.svg?token=qB1iXZPP7iKjyeqfe4pA\u0026branch=master)](https://travis-ci.com/joseluisq/briefest) [![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg)](http://standardjs.com/)\n\n\u003e Small and fast [Typescript](https://www.typescriptlang.org/) [unit testing](https://en.wikipedia.org/wiki/Unit_testing) library with no dependencies.\n\n![Testing using Briefest](https://user-images.githubusercontent.com/1700322/75325099-8215ad80-5878-11ea-9178-a62379ac92c5.png)\n\n## Install\n\n[Yarn](https://github.com/yarnpkg/)\n\n```sh\nyarn add briefest --dev\n```\n\n[NPM](https://www.npmjs.com/)\n\n```sh\nnpm install briefest --save-dev\n```\n\n[UMD](https://github.com/umdjs/umd/) file is also available on [unpkg](https://unpkg.com):\n\n```html\n\u003cscript src=\"https://unpkg.com/browse/briefest/testing.min.js\"\u003e\u003c/script\u003e\n```\n\nYou can use the library via `window.briefest`.\n\n## Usage\n\n### Simple tests\n\n```ts\nimport { test } from \"briefest\"\n\ntest(\"Simple tests\", (t, done) =\u003e {\n    t.isPrimitive(-1)\n    t.isPrimitive(2n ** 8n)\n\n    t.isEqualPrimitive(undefined, undefined)\n\n    t.isEqual(\"\", \"\")\n    t.isEqual(64n, 2n ** 6n)\n\n    t.isNotEqual({}, {})\n    t.isNotEqual(new Date(), new Date())\n\n    done()\n})\n```\n\n### Asynchronous tests\n\n```ts\nimport { test } from \"briefest\"\n\nconst callbackTest = (func: (n: number) =\u003e void) =\u003e setTimeout(() =\u003e func(500), 200)\nconst asyncTest = () =\u003e new Promise\u003cnumber\u003e((resolve) =\u003e setTimeout(() =\u003e resolve(600), 100))\n\ntest(\"Async tests\", (t, done) =\u003e {\n    callbackTest(async (val) =\u003e {\n        t.isEqual(500, val)\n\n        // an async/await example\n        t.isEqual(600, await asyncTest())\n\n        done()\n    })\n})\n```\n\n## Contributions\nFeel free to send some [pull request](https://github.com/joseluisq/briefest/pulls) or [issue](https://github.com/joseluisq/briefest/issues).\n\n## License\nMIT license\n\n© 2020 [Jose Quintana](http://git.io/joseluisq)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjoseluisq%2Fbriefest","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjoseluisq%2Fbriefest","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjoseluisq%2Fbriefest/lists"}