{"id":"eyycheev/jest-mock-rbx","name":"jest-mock-rbx","scope":"eyycheev","platform":"roblox","description":"Mirrored from the Wally registry.","version":"3.14.0-rbx.2","latest":"3.14.0-rbx.2","versions":["3.14.0-rbx.0","3.14.0-rbx.1","3.14.0-rbx.2"],"license":"MIT","licenseRating":"safe","licenseCaveats":["The package archive does not include its license text; the license is declared in its manifest metadata."],"licenseVerified":false,"dependencies":{"eyycheev/jest-types":{"version":"^3.14.0-rbx.2","alias":"JestTypes"},"jsdotlua/luau-polyfill":{"version":"^1.2.7","alias":"LuauPolyfill"}},"integrity":"f6691dbc7f71a383c41a4584dfd8d514a6abbffcdec9554388e6eb4d6ca8a5c6","likes":0,"downloads":0,"install":"forest install eyycheev/jest-mock-rbx","url":"https://forest.dev/p/roblox/eyycheev/jest-mock-rbx","files":"https://api.forest.dev/ai/package/roblox/eyycheev/jest-mock-rbx/files","readme":"# jest-mock-rbx\n\n*No upstream. Roblox only.*\n\nThis package implements Jest's data model mocking capabilities for Roblox:\n\n* `InstanceProxy`, used for constructing objects that act like an existing\n  instance, except actions can be intercepted and mocked.\n* `DataModelMocker`, provides higher-level proxies that can interact with each\n  other as part of a fake data model.\n\n---\n\n### :pencil2: Notes\n* Right now, only a limited subset of data model mocking features are\n  implemented and available for use.\n* `DataModelMocker` should be used for constructing instance mocks, not\n  `InstanceProxy`.\n\t* The `InstanceProxy` class is a minimal, self-contained implementation with\n\tno special behaviour.\n\t* The `DataModelMocker` class allows proxies to be reused, and provides\n\tuseful default mock behaviour like returning proxied descendants or ancestry.\n* `InstanceProxy` intentionally only implements some of an `Instance`'s\n  capabilities.\n\t* It is assumed that the instance proxy is being used on normal, idiomatic\n\tcode that would correctly function if given an `Instance`.\n\t* Instance proxies have normal reference-based equality. They are not equal\n\tto the original instance, nor to any other proxies of that instance.\n\t* Instance proxies can't be consumed by functions expecting a \"proper\n\tInstance\".\n\t\t* In particular, calls to C such as `x:IsAncestorOf(InstanceProxy)` will\n\t\t  error as these calls are not mockable.\n\t\n","readmeTruncated":false}