{"id":13620194,"url":"https://github.com/rahmatagungj/owntest","last_synced_at":"2026-07-22T20:32:48.660Z","repository":{"id":133609351,"uuid":"460871188","full_name":"rahmatagungj/owntest","owner":"rahmatagungj","description":"Simple JavaScript Testing Framework with only one file and zero dependencies.","archived":false,"fork":false,"pushed_at":"2022-03-16T06:16:39.000Z","size":437,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-10-12T02:38:51.319Z","etag":null,"topics":["javascript","testing"],"latest_commit_sha":null,"homepage":"https://rahmatagungj.github.io/owntest","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/rahmatagungj.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,"governance":null,"roadmap":null,"authors":null}},"created_at":"2022-02-18T13:50:19.000Z","updated_at":"2023-07-12T11:56:41.000Z","dependencies_parsed_at":"2024-01-06T14:52:15.353Z","dependency_job_id":null,"html_url":"https://github.com/rahmatagungj/owntest","commit_stats":null,"previous_names":[],"tags_count":9,"template":false,"template_full_name":null,"purl":"pkg:github/rahmatagungj/owntest","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rahmatagungj%2Fowntest","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rahmatagungj%2Fowntest/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rahmatagungj%2Fowntest/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rahmatagungj%2Fowntest/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rahmatagungj","download_url":"https://codeload.github.com/rahmatagungj/owntest/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rahmatagungj%2Fowntest/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":35777195,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-07-20T02:08:10.276Z","status":"online","status_checked_at":"2026-07-22T02:00:06.236Z","response_time":124,"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":["javascript","testing"],"created_at":"2024-08-01T21:00:53.288Z","updated_at":"2026-07-22T20:32:48.645Z","avatar_url":"https://github.com/rahmatagungj.png","language":"JavaScript","funding_links":[],"categories":["O"],"sub_categories":[],"readme":"\n# OwnTest\n\nSimple JavaScript Testing Framework with only single file, zero dependencies and zero configuration.\n\n```bash\nUsage:\n\n\towntest [options]\n\nOptions:\n\n\tinit            : initialize ownTest\n\n\t--test          : run a single test file\n\n\t-h | --help     : show help\n\n\t-v | --version  : show version\n```\n\n## To Use\n1. Initialize your ownTest project:\n```bash\nnode owntest.js init\n```\n2. Create test file with format `name.test.js`\n\n\u003e You can put file in any folder but recommended on `__test__`.\n\n3. Write test code in test file.\n4. Run your test file:\n  \t- Run `owntest.js` to run all test.\n  \t- Run `owntest.js --test=name.test.js` to run single test.\n\n## Example Usage\nYou can see all example in `example` folder or see [Owntest Example](https://github.com/rahmatagungj/owntest/tree/master/example).\n\n## Configuration\nYou can configure your ownTest by following steps:\n1. create `owntest.config.json` file in your project root folder.\n2. edit `owntest.config.json` file as following:\n\t- `\"testPath\": \"__test__\"` - path to test folder.\n\t- `\"testIgnore\": [\"node_modules\"]` - list of folder to ignore.\n\t- `\"mode\": \"production\"` - mode of your ownTest.\n\t- `\"autoUpdate\": true | false` - auto update your ownTest.\n3. run `owntest.js` to run all test.\n\n\n## Setup and Teardown\nOwnTest provides function to handle setup and teardown, you can use it in your test file for setup work that needs to happen before each test and teardown work that needs to happen after each test.\n\n### Repeating Setup\n```js\nbeforeEach(() =\u003e {\n\t/** put your function or variable here */\n});\n\nafterEach(() =\u003e {\n\t/** put your function or variable here */\n});\n```\n\n### One-Time Setup\n```js\nbeforeAll(() =\u003e {\n\t/** put your function or variable here */\n});\n\nafterAll(() =\u003e {\n\t/** put your function or variable here */\n});\n```\n\n## Expect\n\nExpect to give you access to a number of \"matches\" that will allow you to validate things, including several methods.\n\n\n### Methods\n\nAll of the methods below can be used with a negation format like `not()`, example:\n\n```js\n\n// normal\n\nexpect(1).toBe(1);\n\n// negation\n\nexpect(1).not().toBe(2);\n\n```\n\n- `expect(actual).toExist()`\n\nExpects that the actual value is not `undefined` or `null`.\n\n- `expect(actual).toBe(expected)`\n\nExpects that the actual value is equal to the expected value.\n\n- `expect(actual).toEqual(expected)`\n\nExpects that the actual value is equal to the expected value.\n\n- `expect(actual).toStrictEqual(expected)`\n\nExpects that the actual value is strictly equal to the expected value.\n\n- `expect(actual).toBeType(expected)`\n\nExpects that the actual value is of the same type as the expected value.\n\n- `expect(actual).toBeTruthy()`\n\nExpects that the actual value is truthy.\n\n- `expect(actual).toBeFalsy()`\n\nExpects that the actual value is falsy.\n\n- `expect(actual).toBeGreaterThan(expected)`\n\nExpects that the actual value is greater than the expected value.\n\n- `expect(actual).toBeLessThan(expected)`\n\nExpects that the actual value is less than the expected value.\n\n- `expect(actual).toBeCloseTo(expected)`\n\nExpects that the actual value is close to the expected value.\n\n- `expect(actual).toBeInstanceOf(expected)`\n\nExpects that the actual value is an instance of the expected value.\n\n- `expect(actual).toBeOneOf(expected)`\n\nExpects that the actual value is one of the expected values.\n\n- `expect(actual).toBeBetween(expected, expected)`\n\nExpects that the actual value is between the expected values.\n\n- `expect(actual).toBeLessThanOrEqual(expected)`\n\nExpects that the actual value is less than or equal to the expected value.\n\n- `expect(actual).toBeGreaterThanOrEqual(expected)`\n\nExpects that the actual value is greater than or equal to the expected value.\n\n- `expect(actual).toThrowError()`\n\nExpects that the actual value throws an error.\n\n- `expect(actual).toBeNull()`\n\nExpects that the actual value is `null`.\n\n- `expect(actual).toBeUndefined()`\n\nExpects that the actual value is `undefined`.\n\n- `expect(actual).toBeNaN()`\n\nExpects that the actual value is `NaN`.\n\n- `expect(actual).toBeDefined()`\n\nExpects that the actual value is defined.\n\n- `expect(actual).toBeFinite()`\n\nExpects that the actual value is `finite`.\n\n- `expect(actual).toBePositive()`\n\nExpects that the actual value is `positive`.\n\n- `expect(actual).toBeNegative()`\n\nExpects that the actual value is `negative`.\n\n- `expect(actual).toBeZero()`\n\nExpects that the actual value is `zero`.\n\n- `expect(actual).toBeGreaterThanZero()`\n\nExpects that the actual value is `greater than zero`.\n\n- `expect(actual).toBeLessThanZero()`\n\nExpects that the actual value is `less than zero`.\n\n- `expect(actual).toBePositiveInfinity()`\n\nExpects that the actual value is `positive infinity`.\n\n- `expect(actual).toBeNegativeInfinity()`\n\nExpects that the actual value is `negative infinity`.\n\n- `expect(actual).toContain(expected)`\n\nExpects that the actual value contains the expected value.\n\n- `expect(actual).toThrow(expected)`\n\nExpects that the actual value throws the expected value.\n\n- `expect(actual).toHaveReturned(expected)`\n\nExpects that the actual value has returned the expected value.\n\n- `expect(actual).toHaveReturnedWith(expected)`\n\nExpects that the actual value has returned the expected value.\n\n- `expect(actual).toHaveLastReturnedWith(expected)`\n\nExpects that the actual value has last returned the expected value.\n\n- `expect(actual).toHaveLength(expected)`\n\nExpects that the actual value has the expected length.\n\n- `expect(actual).stringMatch(expected)`\n\nExpects that the actual value matches the expected value.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frahmatagungj%2Fowntest","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frahmatagungj%2Fowntest","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frahmatagungj%2Fowntest/lists"}