{"id":16639741,"url":"https://github.com/artemave/assert-raisins","last_synced_at":"2025-10-30T09:30:46.172Z","repository":{"id":57215070,"uuid":"239366960","full_name":"artemave/assert-raisins","owner":"artemave","description":"Minimalistic, debugger friendly test runner for Node","archived":false,"fork":false,"pushed_at":"2024-05-16T16:05:00.000Z","size":146,"stargazers_count":2,"open_issues_count":2,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-02T07:41:16.495Z","etag":null,"topics":["javascript","nodejs","test","test-framework","test-runner","testing"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","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/artemave.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":"2020-02-09T20:10:07.000Z","updated_at":"2024-05-16T16:05:04.000Z","dependencies_parsed_at":"2024-03-22T08:30:38.321Z","dependency_job_id":"acbd80ef-9c08-404b-b6e5-de72542c9755","html_url":"https://github.com/artemave/assert-raisins","commit_stats":null,"previous_names":["artemave/donc"],"tags_count":8,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/artemave%2Fassert-raisins","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/artemave%2Fassert-raisins/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/artemave%2Fassert-raisins/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/artemave%2Fassert-raisins/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/artemave","download_url":"https://codeload.github.com/artemave/assert-raisins/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":238950485,"owners_count":19557533,"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":["javascript","nodejs","test","test-framework","test-runner","testing"],"created_at":"2024-10-12T07:06:55.175Z","updated_at":"2025-10-30T09:30:45.797Z","avatar_url":"https://github.com/artemave.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Assert-raisins\n\nMinimalistic, debugger friendly test runner for Node.\n\nInspired by [baretest](https://github.com/volument/baretest)\n\n## Features\n\n- [fast](https://github.com/artemave/node-test-runners-performance-comparison)\n- parallel\n- run test for a line number\n- no nesting\n- better test cleanup (than after hooks)\n- esm\n- typescript types included\n\n## Usage\n\nInstall:\n\n    npm i --save-dev assert-raisins\n\nWrite a test `test/firstTest.js`:\n\n```javascript\nimport { test } from 'assert-raisins'\nimport assert from 'node:assert'\n\ntest('first passing test', () =\u003e {\n  assert.ok(true)\n})\n\ntest('first failing test', async () =\u003e {\n  assert.equal(1, 2)\n})\n```\n\nRun all tests:\n\n    ./node_modules/.bin/ars test/**/*Test.js\n\nRun individual test:\n\n    # by line number\n    ./node_modules/.bin/ars test/someTest.js:123\n\nOther things available:\n\n- `it` which is an alias for `test`\n- `beforeEach()` to run some code before each test in a file\n- `beforeAll()` to run some code before all tests in a file\n\n### Test cleanup\n\nUse `cleanup` function to register some cleanup hook. If it happens to be called within `beforeAll`, it will be executed \"after all\". If it's called within `beforeEach`, it'll be run \"after each\", and if it's called within a test, it will be executed after that test. `cleanup` can be invoked multiple times.\n\nIn this example, the server will be stopped after each test:\n\n```javascript\nimport { cleanup } from 'assert-raisins'\n\nclass Server {\n  start() {\n    ...\n    cleanup(() =\u003e this.stop())\n  }\n}\n\nbeforeEach(async () =\u003e {\n  const server = new Server()\n  await server.start()\n})\n```\n\n### Parallel tests\n\nWhen running multiple test files, the load is distributed between concurrent workers (limited by the number of CPU cores). Each worker is passed `TEST_WORKER_ID` environment variable (so you can, for instance, create that many test databases).\n\n### typescript, jsx, sourcemaps, code coverage\n\nUse `NODE_OPTIONS` environment variable for any of that. For example, for typescript:\n\n```sh\nNODE_OPTIONS=\"--enable-source-maps --loader ts-node/esm\" ./node_modules/.bin/ars test/*.test.ts\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fartemave%2Fassert-raisins","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fartemave%2Fassert-raisins","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fartemave%2Fassert-raisins/lists"}