{"id":14989775,"url":"https://github.com/incuca/loopback-chai","last_synced_at":"2026-01-05T11:06:03.479Z","repository":{"id":130522990,"uuid":"132164251","full_name":"InCuca/loopback-chai","owner":"InCuca","description":"Loopback Chai Assertions","archived":false,"fork":false,"pushed_at":"2018-05-27T00:42:29.000Z","size":428,"stargazers_count":1,"open_issues_count":1,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-19T20:38:06.224Z","etag":null,"topics":["chai","chaijs","loopback","tdd","testing","testing-library","testing-tool"],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","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/InCuca.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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":"2018-05-04T16:31:06.000Z","updated_at":"2018-05-27T00:52:25.000Z","dependencies_parsed_at":"2023-07-19T06:02:00.251Z","dependency_job_id":null,"html_url":"https://github.com/InCuca/loopback-chai","commit_stats":{"total_commits":61,"total_committers":2,"mean_commits":30.5,"dds":0.360655737704918,"last_synced_commit":"0a08f0194e3ea34409d7b099f53ce6e0cf86ef0e"},"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/InCuca%2Floopback-chai","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/InCuca%2Floopback-chai/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/InCuca%2Floopback-chai/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/InCuca%2Floopback-chai/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/InCuca","download_url":"https://codeload.github.com/InCuca/loopback-chai/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244875046,"owners_count":20524591,"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":["chai","chaijs","loopback","tdd","testing","testing-library","testing-tool"],"created_at":"2024-09-24T14:18:53.776Z","updated_at":"2026-01-05T11:05:58.448Z","avatar_url":"https://github.com/InCuca.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# loopback-chai\n[![Travis](https://img.shields.io/travis/InCuca/loopback-chai/master.svg)](https://travis-ci.org/InCuca/loopback-chai/branches) [![Code Climate](https://img.shields.io/codeclimate/coverage/InCuca/loopback-chai.svg)](https://codeclimate.com/github/InCuca/loopback-chai/test_coverage)\n[![Code Climate](https://img.shields.io/codeclimate/maintainability/InCuca/loopback-chai.svg)](https://codeclimate.com/github/InCuca/loopback-chai/maintainability)\n\n\n\nRepository of [chai](http://www.chaijs.com) assertions for loopback\n\n## External Dependencies\n\nThis plugin expects that you have [chai](http://www.chaijs.com) and [loopback](http://loopback.io) packages available to import.\n\n## Usage with Chai\n\n\n```js\nimport chai from 'chai';\nimport loopbackChai from 'loopback-chai';\n\nchai.use(loopbackChai);\n```\n\n## Added Assertions\n\n```js\nexpect(modelInstance).to.be.model\nexpect(Model).to.have.relationship('name', 'RelatedModel')\nexpect(Model).to.have.a.propertyOfType('property', Object)\nexpect(Model).to.belongsTo('relationship', 'RelatedModel')\nexpect(Model).to.belongsTo('relationship', 'RelatedModel', 'relatedModelId')\nexpect(Model).to.haveOne('relationship', 'RelatedModel')\nexpect(Model).to.haveOne('relationship', 'RelatedModel', 'relatedModelId')\nexpect(Model).to.haveMany('relationship', 'RelatedModel')\nexpect(Model).to.haveMany('relationship', 'RelatedModel', 'relatedModelId')\nexpect(Model).to.inherits(BaseModel)\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fincuca%2Floopback-chai","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fincuca%2Floopback-chai","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fincuca%2Floopback-chai/lists"}