playScreen.test.ts 821 B

123456789101112131415161718
  1. import { describe, expect, it } from 'vitest'
  2. import { CARD_PLAY_DEFAULT_SCREEN, cardPlayNeedsScreenChoice } from './playScreen'
  3. describe('card play screen question', () => {
  4. it('asks in per-screen mode when two monitors are connected', () => {
  5. expect(cardPlayNeedsScreenChoice('per-screen', ['HDMI-A-3', 'HDMI-A-2'])).toBe(true)
  6. })
  7. it('does not ask for one monitor, shared mode, or when a screen was already chosen by the caller', () => {
  8. expect(cardPlayNeedsScreenChoice('per-screen', ['HDMI-A-3'])).toBe(false)
  9. expect(cardPlayNeedsScreenChoice('shared', ['HDMI-A-3', 'HDMI-A-2'])).toBe(false)
  10. expect(cardPlayNeedsScreenChoice('per-screen', ['*'])).toBe(false)
  11. })
  12. it('defaults to every screen, which is what Enter used to do', () => {
  13. expect(CARD_PLAY_DEFAULT_SCREEN).toBe('*')
  14. })
  15. })