import { describe, it, expect } from 'vitest';
import { configSaveNote } from './configNotes';

describe('configSaveNote', () => {
  it('flags port deferral when a port key changed', () => {
    expect(configSaveNote(['port'])).toBe(
      'Saved. Port changes take effect the next time the server starts.'
    );
    expect(configSaveNote(['web_port'])).toBe(
      'Saved. Port changes take effect the next time the server starts.'
    );
  });

  it('plain saved when nothing was deferred', () => {
    expect(configSaveNote([])).toBe('Saved.');
    expect(configSaveNote(undefined)).toBe('Saved.');
  });
});
