import { describe, it, expect, vi } from 'vitest';

vi.stubGlobal('chrome', {
  storage: {
    local: {
      get: vi.fn((_keys: unknown, cb: (r: Record<string, unknown>) => void) => cb({})),
      set: vi.fn((_data: unknown, cb?: () => void) => cb?.()),
    },
  },
});

import * as settingsMod from '../settings';

describe('settings module contract', () => {
  it('exports renderSettings as a function', () => {
    expect(typeof settingsMod.renderSettings).toBe('function');
  });

  it('exports teardownSettings as a function', () => {
    expect(typeof settingsMod.teardownSettings).toBe('function');
  });
});
