{"id":17296097,"url":"https://github.com/timbeyer/chai-samsam","last_synced_at":"2025-08-19T05:10:47.088Z","repository":{"id":66072609,"uuid":"97632286","full_name":"TimBeyer/chai-samsam","owner":"TimBeyer","description":"Deep matching chai assertions using samsam","archived":false,"fork":false,"pushed_at":"2017-07-18T19:24:32.000Z","size":3,"stargazers_count":2,"open_issues_count":1,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-26T20:31:18.934Z","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":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/TimBeyer.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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-07-18T18:44:36.000Z","updated_at":"2021-12-09T03:37:39.000Z","dependencies_parsed_at":"2023-04-04T01:32:42.896Z","dependency_job_id":null,"html_url":"https://github.com/TimBeyer/chai-samsam","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/TimBeyer/chai-samsam","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TimBeyer%2Fchai-samsam","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TimBeyer%2Fchai-samsam/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TimBeyer%2Fchai-samsam/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TimBeyer%2Fchai-samsam/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/TimBeyer","download_url":"https://codeload.github.com/TimBeyer/chai-samsam/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TimBeyer%2Fchai-samsam/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":271103202,"owners_count":24699646,"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-19T02:00:09.176Z","response_time":63,"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":"2024-10-15T11:11:58.203Z","updated_at":"2025-08-19T05:10:47.050Z","avatar_url":"https://github.com/TimBeyer.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# chai-samsam [![Build Status](https://travis-ci.org/TimBeyer/chai-samsam.svg?branch=master)](https://travis-ci.org/TimBeyer/chai-samsam) [![codecov](https://codecov.io/gh/TimBeyer/chai-samsam/branch/master/graph/badge.svg)](https://codecov.io/gh/TimBeyer/chai-samsam)\n\n\nExtends [Chai](http://chaijs.com/) with an assertion for deeply matching just about any kind of object using [samsam](https://github.com/busterjs/samsam).  \nThis project started out as a fork of [chai-deep-match](https://github.com/JamesMGreene/chai-deep-match).  \nIts interface and test cases have been retained and all pass. Thus it can be used as a drop in replacement.  \nHowever, it allows for much looser and deeper matching. ([See the samsam docs](https://github.com/busterjs/samsam#matchobject-matcher))\n\n## Install\n\n```shell\n$ npm install --save chai\n$ npm install --save chai-samsam\n```\n\n## Usage\n\n```js\nconst chai = require('chai')\nconst chaiSamSam = require('chai-samsam')\n\nchai.use(chaiSamSam)\n\nexpect([{\n  firstName: 'John',\n  lastName: 'Doe',\n  jobs: [{ bartender: true, barista: true }]\n}]).to.deep.match([\n  { jobs: [{ barista: true }] }\n])\n// =\u003e  pass\n\nexpect([{\n  firstName: 'John',\n  lastName: 'Doe',\n  jobs: [{ bartender: true, barista: true }]\n}]).to.not.deep.match([\n  { jobs: [{ pilot: true }] }\n])\n// =\u003e  pass\n\n// also possible\nassert.deepMatch(a, b)\nassert.notDeepMatch(a, b)\n```\n\n## License\n\nCopyright (c) 2017, Tim Beyer (MIT License)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftimbeyer%2Fchai-samsam","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftimbeyer%2Fchai-samsam","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftimbeyer%2Fchai-samsam/lists"}