{"id":28719099,"url":"https://github.com/tng/karma-child-process","last_synced_at":"2025-08-29T17:18:58.903Z","repository":{"id":44600996,"uuid":"119376111","full_name":"TNG/karma-child-process","owner":"TNG","description":null,"archived":false,"fork":false,"pushed_at":"2025-07-08T15:56:11.000Z","size":301,"stargazers_count":2,"open_issues_count":0,"forks_count":1,"subscribers_count":8,"default_branch":"master","last_synced_at":"2025-08-17T07:52:46.672Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/TNG.png","metadata":{"files":{"readme":"README.md","changelog":null,"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}},"created_at":"2018-01-29T11:52:16.000Z","updated_at":"2025-07-08T15:56:14.000Z","dependencies_parsed_at":"2024-08-20T13:33:20.583Z","dependency_job_id":"381660e4-1c7c-4880-a48e-0efcfd525d3b","html_url":"https://github.com/TNG/karma-child-process","commit_stats":{"total_commits":44,"total_committers":4,"mean_commits":11.0,"dds":0.09090909090909094,"last_synced_commit":"dd3e2b2f13cc5ca93e2b2fc686bdc55429fb347c"},"previous_names":[],"tags_count":11,"template":false,"template_full_name":null,"purl":"pkg:github/TNG/karma-child-process","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TNG%2Fkarma-child-process","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TNG%2Fkarma-child-process/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TNG%2Fkarma-child-process/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TNG%2Fkarma-child-process/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/TNG","download_url":"https://codeload.github.com/TNG/karma-child-process/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TNG%2Fkarma-child-process/sbom","scorecard":{"id":137227,"data":{"date":"2025-08-04","repo":{"name":"github.com/TNG/karma-child-process","commit":"fe9525a6c5a395d2545084000682bbba40083b34"},"scorecard":{"version":"v5.2.1-28-gc1d103a9","commit":"c1d103a9bb9f635ec7260bf9aa0699466fa4be0e"},"score":3,"checks":[{"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/c1d103a9bb9f635ec7260bf9aa0699466fa4be0e/docs/checks.md#dangerous-workflow"}},{"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/c1d103a9bb9f635ec7260bf9aa0699466fa4be0e/docs/checks.md#binary-artifacts"}},{"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/c1d103a9bb9f635ec7260bf9aa0699466fa4be0e/docs/checks.md#token-permissions"}},{"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/c1d103a9bb9f635ec7260bf9aa0699466fa4be0e/docs/checks.md#packaging"}},{"name":"Code-Review","score":0,"reason":"Found 0/26 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/c1d103a9bb9f635ec7260bf9aa0699466fa4be0e/docs/checks.md#code-review"}},{"name":"Maintained","score":1,"reason":"2 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 1","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/c1d103a9bb9f635ec7260bf9aa0699466fa4be0e/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/c1d103a9bb9f635ec7260bf9aa0699466fa4be0e/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/c1d103a9bb9f635ec7260bf9aa0699466fa4be0e/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/c1d103a9bb9f635ec7260bf9aa0699466fa4be0e/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/c1d103a9bb9f635ec7260bf9aa0699466fa4be0e/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: Apache License 2.0: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/c1d103a9bb9f635ec7260bf9aa0699466fa4be0e/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/c1d103a9bb9f635ec7260bf9aa0699466fa4be0e/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/c1d103a9bb9f635ec7260bf9aa0699466fa4be0e/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 4 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/c1d103a9bb9f635ec7260bf9aa0699466fa4be0e/docs/checks.md#sast"}},{"name":"Vulnerabilities","score":9,"reason":"1 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GHSA-xffm-g5w8-qvg7"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/c1d103a9bb9f635ec7260bf9aa0699466fa4be0e/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-16T06:54:05.891Z","repository_id":44600996,"created_at":"2025-08-16T06:54:05.891Z","updated_at":"2025-08-16T06:54:05.891Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":272731567,"owners_count":24983963,"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-08-29T02:00:10.610Z","response_time":87,"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":[],"created_at":"2025-06-15T05:39:40.808Z","updated_at":"2025-08-29T17:18:58.898Z","avatar_url":"https://github.com/TNG.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# karma-child-process\n\nFramework for karma-test-runner which forks a process on startup to run a \nseparate node process during the karma tests. Internally it uses the `fork` method \nof the `child_process` node module.\n\n## Intention\nThe framework is intended to run a separate node process during karma tests. \nThe process is supposed to mock a (http) server. This is particularly useful \nfor E2E-tests without the need for a complete Docker-setup. Therefore the test \nsetup can start faster, with less costs for infrastructure. \n\n## Installation\nTo install the `karma-child-process` framework in your local directory type\n```\nnpm install karma-child-process --save-dev\n```\nOf course you need to install `karma` as well.\n```\nnpm install karma --save-dev\n```\n\n## Configuration\nFor configuration put this into your `karma.conf.js`:\n```\nconfig = {\n  frameworks: ['child-process'],\n  client: {\n    childProcess: {\n      path: 'path/to/mock-server.js',\n      args: [],\n      options: {}\n    }\n  }\n}\n```\nThe `path` is a mandatory argument providing the location of the node-script \nthat should be started. The path is a relative path based on the `basePath` \nof the project. The `args` and `options` arguments are optional and if provided \ndirectly forwarded to the `fork` method. \n \nTo execute the karma framework just run karma.\n```\n./node_modules/karma/bin/karma start\n```\n \nThe `mock-server.js` should be node-script that is supposed to start a server. \nA possible example might look like so:\n```\n/* eslint-env node */\nconst express = require('express');\nconst bodyParser = require('body-parser');\n \nconst app = express();\n \napp.use(bodyParser.json());\n \nlet mainResponse = {};\n \napp.post('/setMainResponseForTesting', (req, res) =\u003e {\n  mainResponse = req.body;\n  res.header('Access-Control-Allow-Origin', 'http://localhost:9876');\n  res.json(req.body);\n});\n \napp.get('/productiveEndpoint', (req, res) =\u003e {\n  res.header('Access-Control-Allow-Origin', 'http://localhost:9876');\n  res.json(mainResponse);\n});\n \napp.get('/reset', (req, res) =\u003e {\n  mainResponse = {};\n  res.header('Access-Control-Allow-Origin', 'http://localhost:9876');\n  res.json('Reset!');\n});\n \napp.listen(8000);\n```\nIn this case the express-server would run on `localhost` port 8000. But you may configure \nthis via the `args` argument provided in the karma configuration. This is very \nbasic example. For real-world problems you might need a more complex setup. \nRemember that you are not limited to `express`. You may use any node-script that \nprovides the desired solution for your development. \n\n## Shutdown\nDuring shutdown of the karma server the forked process is stopped as well. \nThere is no reset of the server as long as the karma server is running, \nespecially not between different runs of your test suite or even single tests. \nIf you want to achieve this then use the `/reset` Endpoint on your server and\ntrigger it programmatically.\n\n## License\nThis project is licensed under the Apache 2.0 license. For further information \nhave a look into the `LICENSE` file in the project root folder.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftng%2Fkarma-child-process","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftng%2Fkarma-child-process","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftng%2Fkarma-child-process/lists"}