{"id":27970071,"url":"https://github.com/cap-js/cds-test","last_synced_at":"2025-05-07T21:56:17.173Z","repository":{"id":278715271,"uuid":"935283881","full_name":"cap-js/cds-test","owner":"cap-js","description":"Test Support for CAP Node.js","archived":false,"fork":false,"pushed_at":"2025-04-28T17:34:04.000Z","size":144,"stargazers_count":4,"open_issues_count":6,"forks_count":3,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-05-07T21:56:09.974Z","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/cap-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":"2025-02-19T07:43:54.000Z","updated_at":"2025-04-25T15:33:29.000Z","dependencies_parsed_at":null,"dependency_job_id":"cd215586-3bc5-4a82-81f6-8331f9e4e656","html_url":"https://github.com/cap-js/cds-test","commit_stats":null,"previous_names":["cap-js/cds-test"],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cap-js%2Fcds-test","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cap-js%2Fcds-test/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cap-js%2Fcds-test/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cap-js%2Fcds-test/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cap-js","download_url":"https://codeload.github.com/cap-js/cds-test/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252961834,"owners_count":21832193,"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","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-05-07T21:56:16.407Z","updated_at":"2025-05-07T21:56:17.164Z","avatar_url":"https://github.com/cap-js.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Test Support for CAP Node.js\n\n## About this project\n\nThis is a library with test utilities for CAP Node.js applications, like\n- Starting and stopping a CAP server before and after tests\n- A bound HTTP client for the server\n- `chai`-like assertion helpers\n\n## Requirements and Setup\n\nIn your application project, just install the package as dev dependency:\n```sh\nnpm add -D @cap-js/cds-test\n```\n\n## Usage\n\nAdd a simple test file `test/bookshop.test.js ` with this content:\n```js\nconst cds = require('@sap/cds')\n\ndescribe('Sample tests', () =\u003e {\n  const { GET, expect } = cds.test (__dirname+'/..')\n\n  it('serves Books', async () =\u003e {\n    const { data } = await GET `/odata/v4/catalog/Books`\n    expect(data.value.length).to.be.greaterThanOrEqual(5)\n  })\n})\n```\n\nRun it with Jest, for example:\n```sh\nnpx jest\n```\n\n`node --test` and `mocha` runners are supported, too, though with less coverage in real-life projects.\n\n## Documentation\n\nSee the [CAP documentation on `cds.test`](https://cap.cloud.sap/docs/node.js/cds-test) for more.\n\n\n## Support, Feedback, Contributing\n\nThis project is open to feature requests/suggestions, bug reports etc. via [GitHub issues](https://github.com/cap-js/cds-test/issues). Contribution and feedback are encouraged and always welcome. For more information about how to contribute, the project structure, as well as additional contribution information, see our [Contribution Guidelines](CONTRIBUTING.md).\n\n## Security / Disclosure\nIf you find any bug that may be a security problem, please follow our instructions at [in our security policy](https://github.com/cap-js/.github/blob/main/SECURITY.md) on how to report it. Please do not create GitHub issues for security-related doubts or problems.\n\n## Code of Conduct\n\nWe as members, contributors, and leaders pledge to make participation in our community a harassment-free experience for everyone. By participating in this project, you agree to abide by its [Code of Conduct](https://github.com/cap-js/.github/blob/main/CODE_OF_CONDUCT.md) at all times.\n\n## Licensing\n\nCopyright 2024-2025 SAP SE or an SAP affiliate company and cds-test contributors. Please see our [LICENSE](LICENSE) for copyright and license information. Detailed information including third-party components and their licensing/copyright information is available [via the REUSE tool](https://api.reuse.software/info/github.com/cap-js/cds-test).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcap-js%2Fcds-test","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcap-js%2Fcds-test","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcap-js%2Fcds-test/lists"}