{"id":16641222,"url":"https://github.com/cmstead/approvals-client","last_synced_at":"2025-10-07T10:37:02.225Z","repository":{"id":57182919,"uuid":"68241613","full_name":"cmstead/approvals-client","owner":"cmstead","description":"Javascript client for interacting with approvals-server node server","archived":false,"fork":false,"pushed_at":"2017-05-10T00:54:58.000Z","size":18,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-19T00:35:11.476Z","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":"mpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/cmstead.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}},"created_at":"2016-09-14T20:41:36.000Z","updated_at":"2016-09-14T20:56:09.000Z","dependencies_parsed_at":"2022-09-14T06:11:04.131Z","dependency_job_id":null,"html_url":"https://github.com/cmstead/approvals-client","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cmstead%2Fapprovals-client","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cmstead%2Fapprovals-client/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cmstead%2Fapprovals-client/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cmstead%2Fapprovals-client/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cmstead","download_url":"https://codeload.github.com/cmstead/approvals-client/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243159174,"owners_count":20245675,"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":"2024-10-12T07:45:53.221Z","updated_at":"2025-10-07T10:36:57.191Z","avatar_url":"https://github.com/cmstead.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Approvals Client\n\nA client-side approvals library for making calls to a running Approvals Server instance. This \nhas a peer dependency on [Approvals Server](https://www.npmjs.com/package/approvals-server).\n\n## Setup\n\nBy default, Approvals Client comes preconfigured to connect with Approvals Server without any configuration. The \nclient configuration assumes your connection will be localhost:1338. If this is not how your server is configured,\nyou can create a new configuration:\n\n~~~\nvar approvalsClientConfig = {\n    port: 1338, // your port goes here\n    host: 'localhost' // your host name goes here\n}\n~~~\n\nThis configuration should be made global as the module assumes your configuration will be available at the top-level scope\nin your browser.\n\n## Using Approvals Client in your tests\n\nApprovals client is currently designed to work with Mocha test framework. It will be expanded in the future to work with\nJasmine (and others). If you want to help expand support, pull requests are gladly accepted.\n\nWhen writing tests, Approvals Client needs to be initialized with the test framework name.  A suggested method is as follows:\n\n~~~\ndescribe('My mocha test suite', function () {\n    var approvals = approvalsClient('mocha');\n\n    describe('some novel functionality', function () {\n\n        it('should approve my object', function (done) {\n            var myObj = {\n                foo: 'bar',\n                baz: 'quux'\n            };\n\n            approvals.verify(JSON.stringify(myObj), this, done);\n        });\n\n    });\n});\n~~~\n\n**Important note:** Verify MUST be called with a string, the test context (this) and a done function. Approvals Client\nuses the test context to construct file names, so providing the context allows the client to pass values to the\nserver correctly. Mocha's done function is needed because approvals requests are asynchronous and Mocha needs to be\nalerted when any async behavior is complete.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcmstead%2Fapprovals-client","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcmstead%2Fapprovals-client","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcmstead%2Fapprovals-client/lists"}