Writing custom stubs
When SootSim doesn’t have a builtin stub for a package you use, you can provide your own.
Config-based stubs
Noop (empty module)
File stub
Inline stub
Guidelines
- Export the same named exports as the original package
- Use real browser APIs where possible (camera →
getUserMedia, clipboard →navigator.clipboard) - For UI components, return a View/Text wrapper that renders children
- For hooks, return sensible defaults
- Never stub pure JS packages — they work as-is