{"id":23861072,"url":"https://github.com/transpiria/bocker","last_synced_at":"2026-04-30T07:35:14.269Z","repository":{"id":40457144,"uuid":"448175399","full_name":"Transpiria/bocker","owner":"Transpiria","description":"Bocker is a simple mocker for bash.","archived":false,"fork":false,"pushed_at":"2022-08-08T19:36:37.000Z","size":19,"stargazers_count":1,"open_issues_count":1,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-05T18:47:50.624Z","etag":null,"topics":["bash","bats","mock"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"unlicense","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Transpiria.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":"2022-01-15T03:55:49.000Z","updated_at":"2023-07-28T20:43:55.000Z","dependencies_parsed_at":"2022-08-09T21:01:15.109Z","dependency_job_id":null,"html_url":"https://github.com/Transpiria/bocker","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/Transpiria/bocker","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Transpiria%2Fbocker","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Transpiria%2Fbocker/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Transpiria%2Fbocker/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Transpiria%2Fbocker/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Transpiria","download_url":"https://codeload.github.com/Transpiria/bocker/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Transpiria%2Fbocker/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":261937032,"owners_count":23232845,"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":["bash","bats","mock"],"created_at":"2025-01-03T05:46:48.614Z","updated_at":"2026-04-30T07:35:14.224Z","avatar_url":"https://github.com/Transpiria.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Bocker\n\n[![CircleCI](https://img.shields.io/circleci/build/github/Transpiria/bocker/main)](https://app.circleci.com/pipelines/github/Transpiria/bocker)\n[![NPM](https://img.shields.io/npm/v/bocker)](https://www.npmjs.com/package/bocker)\n\nBocker is a simple mocker for bats.\n\n## Installation\n\n### Npm\n\nInstall bocker with [npm](https://www.npmjs.com).\n\n```shell\nnpm install -D bocker\n```\n\n## Usage\n\nSee [examples](examples) for examples.\n\n### Setup\n\nLoad bocker in the test file.\n\n```shell\nload bocker\n```\n\n### Cleanup\n\nClean up the temporary files used during the test run by adding bock_teardown to the test teardown method.\n\n```shell\nfunction teardown() {\n    bock_teardown\n}\n```\n\n### Arrange\n\nSets up a mock of a call.\n\n```shell\narrange [options] call [arguments] -- [does]\n```\n\n#### Options\n\nOptions applied to the mock.\n\n|Option|Description|\n|---|---|\n\n#### Arguments\n\nA list of arguments and/or conditions use to match the call\n\n##### anyargs\n\nMatches any remaining arguments.\n\n##### any\n\nMatches any argument.\n\n##### has\n\nMatches a sequence of arguments in the call.\n\n```shell\n# usage\nhas[-sequence count] sequence\n\n# examples\nhas foo\nhas-1 foo\nhas-2 foo bar\n```\n\n#### Does\n\nWhat the mocked call will do when executed.\n\n### Verify\n\nVerifies a mock was run or not.\n\n```shell\nverify [options] call [arguments]\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftranspiria%2Fbocker","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftranspiria%2Fbocker","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftranspiria%2Fbocker/lists"}