UNPKG

@switchbot/homebridge-switchbot

Version:

The SwitchBot plugin allows you to access your SwitchBot device(s) from HomeKit.

14 lines 556 B
import { describe, expect, it, vi } from 'vitest'; import registerPlatform from './index.js'; import { SwitchBotPlatform } from './platform.js'; import { PLATFORM_NAME, PLUGIN_NAME } from './settings.js'; describe('index.ts', () => { it('should register the platform with homebridge', () => { const api = { registerPlatform: vi.fn(), }; registerPlatform(api); expect(api.registerPlatform).toHaveBeenCalledWith(PLUGIN_NAME, PLATFORM_NAME, SwitchBotPlatform); }); }); //# sourceMappingURL=index.test.js.map