{"id":23065646,"url":"https://github.com/scripterio-js/scripterio","last_synced_at":"2026-02-14T09:01:35.039Z","repository":{"id":263825061,"uuid":"891502671","full_name":"scripterio-js/scripterio","owner":"scripterio-js","description":"JavaScript ESM testing framework running on Node.js that makes testing easy and fun.","archived":false,"fork":false,"pushed_at":"2025-08-02T19:17:55.000Z","size":6781,"stargazers_count":7,"open_issues_count":17,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-10-19T21:49:19.036Z","etag":null,"topics":["esm","esmodules","fast","javascript","native","node","node-js","nodejs","tdd","test","testing-framework","testing-library","testing-tool"],"latest_commit_sha":null,"homepage":"https://scripterio-js.github.io/scripterio/","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/scripterio-js.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","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,"zenodo":null}},"created_at":"2024-11-20T13:01:12.000Z","updated_at":"2025-07-08T13:34:17.000Z","dependencies_parsed_at":null,"dependency_job_id":"9c89c55d-dab0-4309-8222-1742ce9fd14c","html_url":"https://github.com/scripterio-js/scripterio","commit_stats":null,"previous_names":["vadimnastoyashchy/scripterio","scripteriojs/scripterio"],"tags_count":14,"template":false,"template_full_name":null,"purl":"pkg:github/scripterio-js/scripterio","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scripterio-js%2Fscripterio","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scripterio-js%2Fscripterio/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scripterio-js%2Fscripterio/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scripterio-js%2Fscripterio/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/scripterio-js","download_url":"https://codeload.github.com/scripterio-js/scripterio/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scripterio-js%2Fscripterio/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29441087,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-14T07:24:13.446Z","status":"ssl_error","status_checked_at":"2026-02-14T07:23:58.969Z","response_time":53,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["esm","esmodules","fast","javascript","native","node","node-js","nodejs","tdd","test","testing-framework","testing-library","testing-tool"],"created_at":"2024-12-16T05:09:32.168Z","updated_at":"2026-02-14T09:01:35.010Z","avatar_url":"https://github.com/scripterio-js.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n  \u003cimg src=\"assets/logo.png\" height=\"200\" style=\"border-radius:30px;\" alt=\"ScripterI/O test framework logo\"/\u003e\n\u003c/p\u003e\n\n\u003ch1 align=\"center\"\u003eScripterI/O\u003c/h1\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003cb\u003eSimple, fast, dependency-free ESM (ECMAScript Modules) test runner for JavaScript\u003c/b\u003e\n\u003c/p\u003e\n\n## Links\n\n- [Documentation](https://scripterio-js.github.io/scripterio/)\n- [Release Notes / History / Changes](./CHANGELOG.md)\n- [Contributing](./CONTRIBUTING.md)\n- [Issue Tracker](https://github.com/VadimNastoyashchy/scripterio/issues)\n- [NPM Package](https://www.npmjs.com/package/scripterio)\n\n---\n\n## Table of Contents\n\n- [Getting Started](#getting-started)\n  - [Installation](#installation)\n  - [Writing Tests](#writing-tests)\n  - [Running Tests](#running-tests)\n- [Test Runner API](#test-runner-api)\n  - [Assertions](#assertions)\n  - [Test Annotations](#test-annotations)\n  - [Context Options](#context-options)\n- [Async/Await Support](#asyncawait-support)\n- [Reporter](#reporter)\n- [HTTP Client](#http-client)\n  - [Request Methods](#request-methods)\n\n---\n\n## Demo\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"assets/demo.gif\" alt=\"ScripterI/O  test framework logo\"/\u003e\n\u003c/p\u003e\n\n## Getting started\n\n\u003e **Before you follow the steps below, make sure that you have:**\n\n[Node.js](https://nodejs.org/en/download/) installed _globally_ only your system\n\n\u003e *Runner has JavaScript support only!*\n\n\u003e *Runner has ESM support only!*\n\n\u003e *Tested on: Node.js - v18, v20, v22, v23, v24*\n\n## Installing\n\nInstall for Mac, Linux, or Windows:\n\n```bash\nnpm install scripterio --save-dev\n//or\nyarn add scripterio --dev\n```\n\n## Write your first test:\n\nUse the `test` function to write test cases and the `describe` function to group them. \n\nMore examples:\n\n- https://github.com/scripterio-js/scripterio-example (Unit, API, E2E tests)\n- https://github.com/VadimNastoyashchy/json-mcp (Unit tests)\n\nLet's start by creating the `test.js` test file:\n\n### `Example↓`\n\ntest.js\n\n```js\nimport { describe, test, expect} from 'scripterio'\n\ndescribe('Unit tests:', () =\u003e {\n  test('Array has correct length', () =\u003e {\n    const arr = [1, 2, 3]\n    expect(arr).toHaveLength(3)\n  })\n})\n```\n\n## Run test:\nSpecify the **--file=** argument as the path to your test file\n\n```bash\nnpx scripterio --file=\"test.js\"\n//or\nyarn scripterio --file=\"test.js\"\n```\n\n### or\nSpecify the **--folder=** argument as the path to your test(s) folder\n\n```bash\nnpx scripterio --folder=\"tests\"\n//or\nyarn scripterio --folder=\"tests\"\n```\n\n\n\n## Test runner API\n\n---\n\n| Option Name    | Description                                                                           |\n| -------------- | ------------------------------------------------------------------------------------- |\n| `\"test\"`       | `test` is where you perform individual tests                                          |\n| `\"describe\"`   | `describe` is for organizing and grouping tests. Describe can be nested in `describe` |\n| `\"beforeEach\"` | Command allows to define setup tasks at the beginning of every It block               |\n| `\"afterEach\"`  | Command allow to define teardown tasks at the end of every It block                   |\n| `\"beforeAll\"`  | Command allow to define setup tasks at the beginning of describe block                |\n| `\"afterAll\"`   | Command allow to define teardown tasks at the end of describe block                   |\n\n---\n\n## Assertions\n\nUse `expect(actual_value)` with assertions:\n\n### `Example↓`\n\n```js\n  const arr = [1, 2, 3]\n  expect(arr).toHaveLength(3)\n```\n\n---\n\n| Assert Name          | Description                                                                                     |\n| -------------------- | ----------------------------------------------------------------------------------------------- |\n| `.toBeDefined()`     | Check actual value to be not undefined `expect(1).toBeDefined()`                                |\n| `.toHaveLength()`    | Check actual array length to have expected value `expect(arr).toHaveLength(number)`             |\n| `.toBeFalsy()`       | Check actual value to be false                                                                  |\n| `.toBeTruthy()`      | Check actual value to be true                                                                   |\n| `.toBeEqual()`       | Check actual and expected values are the same (using ===) `expect(value).toEqual(value)`        |\n| `.notToEqual()`      | Check actual and expected values are not the same (using ===) `expect(value).notToEqual(value)` |\n| `.toBeNull()`        | Check actual value to be null                                                                   |\n| `.notToBeNull()`     | Check actual value to be not null                                                               |\n| `.toBeUndefined()`   | Check actual value to be undefined                                                              |\n| `.toBeNaN()`         | Check actual value to be NaN                                                                    |\n| `.toBeGreaterThan()` | Check actual value to be greater than expected value                                            |\n| `.toBeLessThan()`    | Check actual value to be less than expected value                                               |\n| `.toContain()`       | Use when you want to check that an item is in an array or a string.                             |\n| `.toMatch()`         | Use .toMatch() to check that a string matches a regular expression.                             |\n\n---\n\n## Test annotations\n\n`skip()`  Declares a skipped test or test group. Test/s is/are never run.\n\n`only()`  Declares an exclusive test or test group that will be executed. If used, all other tests are skipped.\n\n`todo()`  Declares a test or test group as \"to-do.\" The test(s) is/are marked as pending and will not be executed. Helpful for planning and organizing future tests.\n\n### `Example↓`\n\n\n```js\ntest.skip('description', () =\u003e {})\n//or\ndescribe.skip('description', () =\u003e {})\n```\n\n```js\ntest.only('description', () =\u003e {\n  // Body of the only test that will be executed\n})\n//or\ndescribe.only('description', () =\u003e {\n  // Body of the only test group that will be executed\n})\n```\n\n```js\ntest.todo('description')\n//or\ndescribe.todo('description', () =\u003e {\n  // This test group is a placeholder and won't run\n})\n```\n\n---\n\n## Context options\n\nUse `{}` as the second parameter for describe and test functions.\n\n---\n\n| Option Name         | Description                                                             |\n| ------------------- | ----------------------------------------------------------------------- |\n| `{ timeout: 2000 }` | Option timeout (in ms) for specifying how long to wait before aborting. |\n|                     | The default timeout is 5 seconds.                                       |\n| `{ tags: 'smoke' }` | To tag a test, either provide an additional details object              |\n|                     | when declaring a test.                                                  |\n|                     | You can also tag all tests in a group or provide multiple tags:         |\n|                     | `{ tags: ['smoke', 'regression'] }`                                     |\n| `{ retry: 2 }`      | To specify how many times a failed test should be retried               |\n|                     | before being marked as failed                                           |\n|                     | If a test fails, it will be retried up to the specified number of times |\n|                     | If the test passes on any retry, it is marked as passed                 |\n|                     | If it fails all attempts, it is marked as failed                        |\n\n### `Timeout example↓`\n\n#### To specify globally for all tests, use the following CLI flag:\n\n```bash\nnpx scripterio --file=\"test.js\" --timeout=30000\n# or\nnpx scripterio --folder=\"tests\" --timeout=20_000\n```\n\n#### To specify individual tests, use the context option:\n\n```js\ntest('Wait 1 sec and check', { timeout: 2000}, async () =\u003e {\n  const number = await new Promise((resolve) =\u003e\n    setTimeout(() =\u003e resolve(1), 1_000)\n  )\n  expect(number).toBeDefined()\n})\n```\n\n### `Tags example↓`\n\nSingle tag:\n\n```js\ndescribe('Unit tests:', () =\u003e {\n  test('Array has correct length', { tags: 'smoke' }, () =\u003e {\n    const arr = [1, 2, 3]\n    expect(arr).toHaveLength(3)\n  })\n})\n```\nYou can now run tests that have a particular tag with `--tags` command line option:\n\n```bash\nnpx scripterio --folder=\"tests\" --tags=\"smoke\"\n```\n\nMultiple tags:\n\n```js\ndescribe('Unit tests:', () =\u003e {\n  test('Array has correct length', { tags: ['smoke', 'regression'] }, () =\u003e {\n    const arr = [1, 2, 3]\n    expect(arr).toHaveLength(3)\n  })\n})\n```\n\nYou can now run tests that have tags separated by `,` (comma) with `--tags` command line option:\n\n```bash\nnpx scripterio --folder=\"tests\" --tags=\"smoke,regression\"\n```\n\n### `Retry example↓`\n\n#### To specify globally for all tests, use the following CLI flag:\n\n```bash\nnpx scripterio --file=\"test.js\" --retry=2\n# or\nnpx scripterio --folder=\"tests\" --retry=3\n```\n\n#### To specify individual tests, use the context option:\n\n```js\ntest('Flaky test', { retry: 2 }, () =\u003e {\n  // Your test code that might fail intermittently\n})\n```\n\nThis will retry the test up to 2 additional times if it fails.\n\n---\n\n## Async/Await support\n\nAlso supports async/await approach.\nTo use it, just add `async` keyword before the function callback inside the `test` block:\n\n### `Example↓`\n\n```js\ntest('Wait 1 sec and check', async () =\u003e {\n  const number = await new Promise((resolve) =\u003e\n    setTimeout(() =\u003e resolve(1), 1_000)\n  )\n  expect(number).toBeDefined()\n})\n```\n\n## Reporter\nScripterI/O provides test reporting functionality with multiple reporter options:\n\n### HTML Reporter\n\nTo generate an HTML report of your test results, use the `--reporter=html` flag:\n\n```bash\nnpx scripterio --file=test.js --reporter=html\n```\n\nThis will create a detailed HTML report in the `scripterio-report` directory. The report includes:\n\n- Total test count, passed tests, and failed tests\n- Organized test results by file and test suites\n- Detailed error information for failed tests\n- Interactive UI to expand/collapse test suites\n\nExample of HTML reporter:\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"assets/reporter.png\" alt=\"ScripterI/O  html reporter\"/\u003e\n\u003c/p\u003e\n\n## HTTP client\n\nScripterI/O has built-in http client to preform the request.\n\n### `Example↓`\n\ntest.js\n\n```js\nimport { describe, test, expect, request} from 'scripterio'\n\ndescribe('Example of http client', () =\u003e {\n  test('Demonstrate get() method to get single object', async () =\u003e {\n    const response = await request.get('https://api.restful-api.dev/objects/7')\n    expect(response.status).toBeEqual(200)\n  })\n})\n```\n\u003e *If you use the `request` object in your tests, the network details are automatically displayed in the HTML report!*\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"assets/api.png\" alt=\"ScripterI/O  html reporter with api details\"/\u003e\n\u003c/p\u003e\n\n## Request methods\n\n---\n\n| Option Name         | Description                                                             |\n| ------------------- | ----------------------------------------------------------------------- |\n| `request.get()`     | Sends a GET request to the specified URL and returns a Response object. |\n| `request.post()`    | Sends a POST request to the specified URL                               |\n| `request.put()`     | Sends a PUT request to the specified URL                                |\n| `request.patch()`   | Sends a PATCH request to the specified URL                              |\n| `request.delete()`  | Sends a DELETE request to the specified URL                             |\n\n\u003e  Additional examples : [https://github.com/scripterio-js/scripterio-example/blob/main/tests/api_tests.j](https://github.com/scripterio-js/scripterio-example/blob/main/tests/api_tests.js)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fscripterio-js%2Fscripterio","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fscripterio-js%2Fscripterio","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fscripterio-js%2Fscripterio/lists"}