import { describe, it, expect } from 'vitest'
import { DEFAULT_DECK_CONFIG } from './deckConfig.js'

describe('deckConfig', () => {
  it('exports DEFAULT_DECK_CONFIG with expected keys', () => {
    expect(DEFAULT_DECK_CONFIG).toMatchObject({
      requiredConsecutiveCorrect: 3,
      defaultAttemptSize: 10,
      priorityIncreaseOnIncorrect: 5,
      priorityDecreaseOnCorrect: 2,
      immediateFeedbackEnabled: true,
      includeKnownInAttempts: false,
      shuffleAnswerOrder: true,
      excludeFlaggedQuestions: false,
      timeLimitSeconds: null,
    })
  })

  it('has only known config keys', () => {
    const known = new Set([
      'requiredConsecutiveCorrect',
      'defaultAttemptSize',
      'priorityIncreaseOnIncorrect',
      'priorityDecreaseOnCorrect',
      'immediateFeedbackEnabled',
      'includeKnownInAttempts',
      'shuffleAnswerOrder',
      'excludeFlaggedQuestions',
      'timeLimitSeconds',
    ])
    for (const key of Object.keys(DEFAULT_DECK_CONFIG)) {
      expect(known.has(key)).toBe(true)
    }
  })
})
