{"id":19508354,"url":"https://github.com/efekos/es-test","last_synced_at":"2026-02-27T15:44:28.309Z","repository":{"id":234263528,"uuid":"787980983","full_name":"efekos/es-test","owner":"efekos","description":"Test runner designed for TS+ESM environments","archived":false,"fork":false,"pushed_at":"2024-08-10T09:50:07.000Z","size":189,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-07T12:27:19.830Z","etag":null,"topics":["es","es-test","esm","esmodule","esmodules","javascript-test","test","test-esm","test-js","test-ts","testing","typescript-test"],"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/efekos.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":"2024-04-17T14:49:59.000Z","updated_at":"2024-08-10T09:50:05.000Z","dependencies_parsed_at":"2024-04-23T16:46:46.323Z","dependency_job_id":"4b708ca5-b8b4-4f71-895f-5424f348ad68","html_url":"https://github.com/efekos/es-test","commit_stats":null,"previous_names":["efekos/es-test"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/efekos/es-test","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/efekos%2Fes-test","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/efekos%2Fes-test/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/efekos%2Fes-test/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/efekos%2Fes-test/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/efekos","download_url":"https://codeload.github.com/efekos/es-test/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/efekos%2Fes-test/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29902709,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-27T14:46:13.553Z","status":"ssl_error","status_checked_at":"2026-02-27T14:46:10.522Z","response_time":57,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: 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":["es","es-test","esm","esmodule","esmodules","javascript-test","test","test-esm","test-js","test-ts","testing","typescript-test"],"created_at":"2024-11-10T23:05:19.655Z","updated_at":"2026-02-27T15:44:28.291Z","avatar_url":"https://github.com/efekos.png","language":"TypeScript","readme":"# es-test `v1.0.7`\n\n\u003e Simple test runner to use in ESM modules.\n\nAfter trying to use jest with an esm module for so long i just gave up and made this module. This module will scan for every .test.js or .spec.js file in current workspace and try\nrunning them. You can limit scanning into one directory by passing in the dir name like this:\n- `C:\\myapp\u003e estest` - Scans C:\\myapp\n- `C:\\myapp\u003e estest dist` - Scans C:\\myapp\\dist\n\n# Usage\n\n* `npm i -D @efekos/es-test`\n* Create a test script to run estest: `\"estest\"` (Also create `pretest` to compile if you use TypeScript)\n* Write some tests\n* Run `npm test`\n\n## Writing tests\n\n```javascript\nimport {describe,it,inst} from '@efekos/es-test/bin/testRunner.js' // You excplicitly have to import from testRunner.js i have no idea why\nimport {expect} from 'chai' // or any other assertion module\n\ndescribe('9 + 10',()=\u003e{ // create a suite with describe\n\n    it('should be 21',()=\u003e{ // create a test with it\n\n        expect(9+10).to.be.equal(21);\n\n    });\n});\n\nfunction isNumber(s){\n    return /[+-]?\\d+(\\.\\d+)?/.test(s);\n}\n\ndescribe('isNumber function',()=\u003e{\n\n    it('should match all the numbers',()=\u003e{\n\n        inst(()=\u003e{ // Create different cases with inst\n            expect(isNumber('5')).to.be.equal(true)\n        });\n        \n        inst(()=\u003e{\n            expect(isNumber('455.34')).to.be.equal(true)\n        });\n        \n        inst(()=\u003e{\n            expect(isNumber('-145')).to.be.equal(true)\n        });\n        \n        inst(()=\u003e{\n            expect(isNumber('-3465.0000000003')).to.be.equal(true)\n        });\n        \n        inst(()=\u003e{\n            expect(isNumber('-.3495')).to.be.equal(true)\n        });\n        \n        inst(()=\u003e{\n            expect(isNumber('+.25')).to.be.equal(true)\n        });\n\n    },true /*this true makes this test a cased test*/);\n\n});\n```\n\n## Handling errors\n\n```javascript\nimport {onError} from '@efekos/es-test/bin/testRunner.js'\n\nonError('CustomError',(err)=\u003e{ // Handle custom error types\n    return {\n        passed:false,\n        expected:err.exp,\n        actual:err.act,\n        formatMode:'none' // 'str' will make every difference in actual value look red instead of making it completely red in summary\n    }\n})\n\n```","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fefekos%2Fes-test","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fefekos%2Fes-test","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fefekos%2Fes-test/lists"}