{"id":17114667,"url":"https://github.com/neurospeech/web-atoms-unit","last_synced_at":"2026-04-15T12:38:50.906Z","repository":{"id":80234824,"uuid":"102249307","full_name":"neurospeech/web-atoms-unit","owner":"neurospeech","description":"Simple Unit testing framework for web atoms","archived":false,"fork":false,"pushed_at":"2018-01-16T14:05:39.000Z","size":61,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-10-27T23:48:10.423Z","etag":null,"topics":["javascript","typescript","unit-testing","web-atoms"],"latest_commit_sha":null,"homepage":null,"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/neurospeech.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":"2017-09-03T07:52:16.000Z","updated_at":"2018-05-19T14:12:00.000Z","dependencies_parsed_at":"2023-06-14T21:16:13.968Z","dependency_job_id":null,"html_url":"https://github.com/neurospeech/web-atoms-unit","commit_stats":null,"previous_names":[],"tags_count":19,"template":false,"template_full_name":null,"purl":"pkg:github/neurospeech/web-atoms-unit","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/neurospeech%2Fweb-atoms-unit","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/neurospeech%2Fweb-atoms-unit/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/neurospeech%2Fweb-atoms-unit/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/neurospeech%2Fweb-atoms-unit/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/neurospeech","download_url":"https://codeload.github.com/neurospeech/web-atoms-unit/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/neurospeech%2Fweb-atoms-unit/sbom","scorecard":{"id":681527,"data":{"date":"2025-08-11","repo":{"name":"github.com/neurospeech/web-atoms-unit","commit":"16f51dd9a73a3c4ad896bc999c4b2ba05375158e"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3,"checks":[{"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/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Code-Review","score":0,"reason":"Found 1/19 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/f6ed084d17c9236477efd66e5b258b9d4cc7b389/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/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"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/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"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/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"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/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"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/f6ed084d17c9236477efd66e5b258b9d4cc7b389/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/f6ed084d17c9236477efd66e5b258b9d4cc7b389/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/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"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/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/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/f6ed084d17c9236477efd66e5b258b9d4cc7b389/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/f6ed084d17c9236477efd66e5b258b9d4cc7b389/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/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}}]},"last_synced_at":"2025-08-21T23:20:04.688Z","repository_id":80234824,"created_at":"2025-08-21T23:20:04.688Z","updated_at":"2025-08-21T23:20:04.688Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31842192,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-15T11:29:19.690Z","status":"ssl_error","status_checked_at":"2026-04-15T11:29:19.171Z","response_time":63,"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":["javascript","typescript","unit-testing","web-atoms"],"created_at":"2024-10-14T17:19:44.184Z","updated_at":"2026-04-15T12:38:50.859Z","avatar_url":"https://github.com/neurospeech.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Web Atoms Unit Testing\n\nSimple Unit testing framework for web atoms.\n\n## Dependencies\n\n    typescript\n\nPlease make sure, decorator support is enabled for your tests.\n\n## Installation\n\n    npm install web-atoms-unit\n\n## Running with Node\n\nCreate a `run-tests.js` file\n\n```javascript\n    var fs = require(\"fs\");\n    var vm = require(\"vm\");\n\n    function loadScript(file){\n        var s = fs.readFileSync(file,'utf-8');\n        var script = new vm.Script(s, { filename: file });\n        script.runInThisContext();\n    }\n\n    // load web atoms mock\n    loadScript(\"./node_modules/web-atoms-unit/web-atoms-mock.js\");\n\n    // load web atoms mvvm\n    loadScript(\"./node_modules/web-atoms-mvvm/dist/web-atoms-mvvm.js\");\n\n    // load web atoms unit\n    loadScript(\"./node_modules/web-atoms-unit/index.js\");\n\n\n    // load your tests..\n    // ideally all typescript files should be transpiled into\n    // one js file\n    loadScript(\"./tests/generated-test.js\");\n    \n    // .. so on.. you can write a script to load many files....\n\n    var p = WebAtoms.Unit.TestRunner.instance.run(process.argv[2]);\n\n    p.then(function(){\n        process.exit();\n    });\n\n    p.catch(function(error){\n        console.error(error);\n        process.abort();\n    });\n\n```\n\n```node\n    // run all tests\n    node run-tests.js\n\n    // run tests by filtering categories provided by comma separated categories\n    node run-tests.js categories,categories\n\n    // run tests by filtering categories provided by regular expressions\n    node run-tests.js /regex/i\n```\n\n## Running with browser\n\n```html\n    \u003chtml\u003e\n    \u003chead\u003e\n        \u003cscript src=\"//cdn.jsdelivr.net/npm/web-atoms-unit@1.0.4/index.js\"\u003e\u003c/script\u003e\n    \u003c/head\u003e\n    \u003cbody\u003e\n        \u003cscript\u003e\n            // make sure all other scripts are loaded on the page\n            // before calling this one...\n            setTimeout(function(){\n                WebAtoms.Unit.TestRunner.instance.run();\n            },100);\n        \u003c/script\u003e\n    \u003c/body\u003e\n    \u003c/html\u003e\n```\n\n## Sample Test class\n\n```typescript\n    /// \u003creference path=\"./node_modules/web-atoms-unit/index.d.ts\"\u003e\n\n    var Category = WebAtoms.Unit.Category;\n    var Test = WebAtoms.Unit.Test;\n    var Assert = WebAtoms.Unit.Assert;\n    var TestItem = WebAtoms.Unit.TestItem;\n\n    @Category(\"Math-Test\")\n    class SampleTest extends TestItem{\n\n        \n        @Test(\"Add\")\n        add():void{\n            Assert.equals(4, 2 + 2);\n            Assert.doesNotEqual(5, 2 + 2);\n        }\n\n        divide(a:number,b:number):number{\n            if(b==0){\n                throw new Error(\"Division by zero\");\n            }\n            return a/b;\n        }\n\n        @Test(\"Divide by zero\")\n        divideByZero():void{\n            Assert.throws('Division by zero', ()=\u003e{\n                this.divide(1,0);\n            });\n        }\n\n\n        // async...\n        @Test(\"Async test\")\n        async asyncTest():Promise\u003cany\u003e{\n\n            // this.delay(100) is inbuilt\n            // function, you can use any\n            // promise to await\n            await this.delay(100);\n\n            Assert.equals(2,2);\n        }\n\n        @Test(\"Async throws\")\n        async asyncThrows():Promise\u003cany\u003e{\n\n            // catches exception on \n            // asynchronous result\n\n            await Assert.throwsAsync('Division by zero',\n                async ():Promise\u003cany\u003e =\u003e{\n                    await this.delay(100);\n                    this.divide(1,0);\n                }\n            );\n        }\n\n    }\n\n```        \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fneurospeech%2Fweb-atoms-unit","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fneurospeech%2Fweb-atoms-unit","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fneurospeech%2Fweb-atoms-unit/lists"}