{"id":15881321,"url":"https://github.com/kalloc/smock-reverts-bug","last_synced_at":"2025-04-02T05:26:17.042Z","repository":{"id":136768329,"uuid":"579749476","full_name":"kalloc/smock-reverts-bug","owner":"kalloc","description":null,"archived":false,"fork":false,"pushed_at":"2022-12-18T21:20:34.000Z","size":168,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-02-07T20:13:06.426Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","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/kalloc.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":"2022-12-18T19:41:46.000Z","updated_at":"2022-12-18T19:42:19.000Z","dependencies_parsed_at":null,"dependency_job_id":"7b27822c-1065-4674-98cb-320173a7562a","html_url":"https://github.com/kalloc/smock-reverts-bug","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kalloc%2Fsmock-reverts-bug","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kalloc%2Fsmock-reverts-bug/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kalloc%2Fsmock-reverts-bug/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kalloc%2Fsmock-reverts-bug/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kalloc","download_url":"https://codeload.github.com/kalloc/smock-reverts-bug/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246760917,"owners_count":20829382,"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-06T03:41:15.138Z","updated_at":"2025-04-02T05:26:17.018Z","avatar_url":"https://github.com/kalloc.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n\n# The feature reverting with message is not working yet\n\nExpected successful revert with a message for the nested contract call. \n\nUsing very simple contracts:\n```solidity\ncontract B {\n    int counter;\n    function test()\n    public \n    returns(int) {\n        counter+=1;\n        return counter;\n    }\n}\n\ncontract A {\n    address public b;\n    constructor(address dep) {\n        b = dep;\n    }\n\n    function test() public returns(bool) {\n        return B(b).test() \u003e 0;\n    }\n\n}\n```\n\nExample test below:\n```typescript\nfakeB.test.reverts(`Message`);\nawait expect(contract.test())\n    .to.be.revertedWith(\"Message\");\n```\n\n\nBut got error:\n\n```bash\n$ hardhat test\n\n\n  Test\n    A\n      1) should be reverted with message\n\n\n  0 passing (684ms)\n  1 failing\n\n  1) Test\n       A\n         should be reverted with message:\n     AssertionError: Expected transaction to be reverted with reason 'Message', but it reverted without a reason\n      at processTicksAndRejections (node:internal/process/task_queues:96:5)\n      at Context.\u003canonymous\u003e (test/alphazilla.ts:36:17)\n\n\n\ninfo Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.\n```\n\nUpdate: reported https://github.com/defi-wonderland/smock/issues/152\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkalloc%2Fsmock-reverts-bug","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkalloc%2Fsmock-reverts-bug","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkalloc%2Fsmock-reverts-bug/lists"}