{"id":22202162,"url":"https://github.com/rumkin/testup","last_synced_at":"2025-10-27T05:08:53.532Z","repository":{"id":47933435,"uuid":"162902969","full_name":"rumkin/testup","owner":"rumkin","description":"TestUp is a test running suit","archived":false,"fork":false,"pushed_at":"2021-08-11T18:26:10.000Z","size":77,"stargazers_count":5,"open_issues_count":2,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-10-19T11:11:50.933Z","etag":null,"topics":["framework","javascript","testing","tests"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","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/rumkin.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":"2018-12-23T15:36:22.000Z","updated_at":"2021-11-03T06:02:11.000Z","dependencies_parsed_at":"2022-08-12T14:32:02.381Z","dependency_job_id":null,"html_url":"https://github.com/rumkin/testup","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/rumkin/testup","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rumkin%2Ftestup","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rumkin%2Ftestup/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rumkin%2Ftestup/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rumkin%2Ftestup/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rumkin","download_url":"https://codeload.github.com/rumkin/testup/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rumkin%2Ftestup/sbom","scorecard":{"id":789590,"data":{"date":"2025-08-18","repo":{"name":"github.com/rumkin/testup","commit":"1062107920e6f16b416f139b0e8f281bb61c8e2f"},"scorecard":{"version":"v5.2.1-41-g40576783","commit":"40576783fda6698350fcbbeaea760ff827433034"},"score":1.8,"checks":[{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/40576783fda6698350fcbbeaea760ff827433034/docs/checks.md#maintained"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/40576783fda6698350fcbbeaea760ff827433034/docs/checks.md#dangerous-workflow"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/40576783fda6698350fcbbeaea760ff827433034/docs/checks.md#token-permissions"}},{"name":"Code-Review","score":0,"reason":"Found 0/16 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/40576783fda6698350fcbbeaea760ff827433034/docs/checks.md#code-review"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/40576783fda6698350fcbbeaea760ff827433034/docs/checks.md#packaging"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/40576783fda6698350fcbbeaea760ff827433034/docs/checks.md#binary-artifacts"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/40576783fda6698350fcbbeaea760ff827433034/docs/checks.md#pinned-dependencies"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/40576783fda6698350fcbbeaea760ff827433034/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/40576783fda6698350fcbbeaea760ff827433034/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/40576783fda6698350fcbbeaea760ff827433034/docs/checks.md#fuzzing"}},{"name":"License","score":0,"reason":"license file not detected","details":["Warn: project does not have a license file"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/40576783fda6698350fcbbeaea760ff827433034/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/40576783fda6698350fcbbeaea760ff827433034/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/40576783fda6698350fcbbeaea760ff827433034/docs/checks.md#branch-protection"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 12 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/40576783fda6698350fcbbeaea760ff827433034/docs/checks.md#sast"}},{"name":"Vulnerabilities","score":4,"reason":"6 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GHSA-67hx-6x53-jw92","Warn: Project is vulnerable to: GHSA-gxpj-cx7g-858c","Warn: Project is vulnerable to: GHSA-p6mc-m468-83gw","Warn: Project is vulnerable to: GHSA-29mw-wpgm-hmr9","Warn: Project is vulnerable to: GHSA-35jh-r3h4-6jhm","Warn: Project is vulnerable to: GHSA-hj48-42vr-x3v9"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/40576783fda6698350fcbbeaea760ff827433034/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-23T07:07:56.454Z","repository_id":47933435,"created_at":"2025-08-23T07:07:56.454Z","updated_at":"2025-08-23T07:07:56.454Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":281216687,"owners_count":26463033,"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","status":"online","status_checked_at":"2025-10-27T02:00:05.855Z","response_time":61,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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","javascript","testing","tests"],"created_at":"2024-12-02T16:12:36.915Z","updated_at":"2025-10-27T05:08:53.517Z","avatar_url":"https://github.com/rumkin.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# TestUp\n\nTestUp is test running tool. It's created to be modular and use nested context\nto make tests simple, clear and reusable.\n\n## Install\n\n```shell\nnpm i testup\n# or\nnpm i @testup/cli @testup/core @testup/console-reporter\n```\n\n## Usage\n\nCreate `test/module.spec.js`:\n\n```js\nimport assert from 'assert'\n\nexport default ({describe, it}) =\u003e {\n  describe('Test module', () =\u003e {\n    it('Answer is 42', (test) =\u003e {\n      assert.ok(42 !== \"42\", '42 not equal \"42\"')\n\n      test.end()\n    })\n  })\n}\n```\n\nRun in shell\n\n```shell\ntestup run test/module.spec.js\n```\n\n### Modular tests with contexts\n\nTo make tests modular TestUp uses contexts for passing values\nto underlaying tests.\n\n```js\nimport {define} from '@testup/kit'\nimport assert from 'assert'\n\nexport default ({describe, it}) =\u003e {\n  describe('Test module', () =\u003e {\n    use(define('answer', 42))\n\n    it('Answer is 42', (test, {answer}) =\u003e {\n      assert.equal(42, answer)\n\n      test.end()\n    })\n  })\n}\n```\n\n## Packages\n\n* [`@testup/core`](packages/@testup/core) – TestUp Core.\n* [`@testup/cli`](packages/@testup/cli) – TestUp Cli running tool.\n* [`@testup/console-reporter`](packages/@testup/console-reporter) – Unified console test reporter.\n* [`@testup/tap-reporter`](packages/@testup/tap-reporter) – TAP reporter.\n* [`@testup/kit`](packages/@testup/kit) – TestUp helpers kit.\n\n## API\n\n### `describe()`\n```ts\ninterface DescribeFn {\n  (label: string, handler: ScriptFn): void\n}\n```\n\nThis method allow to group tests.\n\n```js\ndescribe('Array', () =\u003e {\n  describe('#find', () =\u003e {\n    it('Finds element in array', (test) =\u003e {\n      // Test body\n      test.end()\n    })\n  })\n})\n```\n\n### `it()`\n```ts\ninterface ItFn {\n  (label: string, ...modifiers: ModifierFn, test: TestCaseFn): void\n}\n```\n\nSpecify single test unit.\n\n```js\nit('The Answer should be 42', (test) =\u003e {\n  assert.equal(answerTheQuestionOfLife(), 42, 'The answer is 42')\n  test.end()\n})\n```\n\n### `use()`\n\n```ts\ninterface UseFn {\n  (modifier: ModifierFn): void\n}\n```\n\nAdd modifier to current test group. This modifier will be executed once for whole\ngroup.\n\n```js\ndescribe('database', () =\u003e {\n  use(async (context, next) =\u003e {\n    const db = new Db()\n\n    await db.connect()\n    try {\n      // Run tests\n      await next({\n        ...context,\n        db,\n      })\n    }\n    finally {\n      await db.disconnect()\n    }\n  })\n\n  it('Should query document from db', async ({db}) =\u003e {\n    const user = await db.getRepo('users').findById(1)\n\n    assert.ok(user !== null)\n  })\n})\n```\n\n### `each()`\n\n```ts\ninterface EachFn {\n  (modifiers: ModifierFn): void\n}\n```\n\nDefine modifiers for descendant test units, groups and tests. Wrappers will be\nexecuted for each test.\n\n```js\nconst counter = (c = 0) =\u003e (context, next) =\u003e next({...context, count: ++c})\n\ndescribe('Group', () =\u003e {\n  each(\n    counter(),\n    () =\u003e {\n      it('Should be equal 1', ({count}) =\u003e {\n        assert.equal(count, 1)\n      })\n\n      it('Should be equal 2', ({count}) =\u003e {\n        assert.equal(count, 2)\n      })\n    }\n  )\n})\n```\n\n## Types\n\n### `Test`\n```ts\ninterface Test {\n  delay(timeout: number): Promise\u003cvoid\u003e\n  end():void\n}\n```\n\nTest has single method `end` which tells that test script reached the end.\n\n### `TestCaseFn()`\n```ts\ninterface TestCaseFn {\n  (context: Object, test: Test): void\n}\n```\n\nThe last argument of `it` function. It contains test body and should throw\nassert exceptions. It accepts `context` argument which contains values\ndefined by modifiers from higher levels of test script.\n\n### `ModifierFn()`\n```ts\ninterface ModifierFn {\n  (context: Object, next: () =\u003e Promise\u003cvoid\u003e): void|Promise\u003cvoid\u003e\n}\n```\n\nModifier is a function that modify context somehow before pass it to lower\nlevels of test script.\n\n### `ScriptFn()`\n```ts\ninterface ScriptFn {\n  (handlers: {describe:DescribeFn, use:UseFn, it:ItFn, each:EachFn}): void\n}\n```\n\nThis function set up test units. It creates groups and test bodies.\n\n## License\n\nMIT © [Rumkin](https://rumk.in)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frumkin%2Ftestup","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frumkin%2Ftestup","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frumkin%2Ftestup/lists"}