Documentation
    Preparing search index...

    Function createMockConfigService

    • Create the NAP-CONFIG mock. The shell is the sole writer: napplets register a schema and read; commit() plays the settings UI.

      Parameters

      Returns MockConfigService

      The config mock service.

      const config = createMockConfigService();
      config.handleMessage('w1', { type: 'config.registerSchema', id: 'r1', schema: MOCK_CONFIG_SCHEMA }, send);
      config.handleMessage('w1', { type: 'config.get', id: 'g1' }, send);
      // → { type: 'config.values', id: 'g1', values: { theme: 'dark', fontSize: 16, ... } }