This plugin uses Bun’s built-in test runner, not Vitest. Bun provides a Jest-compatible testing API with excellent TypeScript support and fast execution.
it('should recover from provider errors', async () => { // Make one provider fail setup.mockRuntime.getMemories.mockRejectedValueOnce(new Error('DB error')); // Should still process message await messageReceivedHandler({...}); // Verify graceful degradation expect(setup.callbackFn).toHaveBeenCalled();});
# Run all bootstrap testsbun test# Run specific test filebun test packages/plugin-bootstrap/src/__tests__/actions.test.ts# Run tests in watch modebun test --watch# Run with coveragebun test --coverage