Summary
Current test coverage is limited to:
- CPU instructions (
cpu.spec.js)
- Basic NES initialization and ROM loading (
nes.spec.js)
- Mapper 0 basics (
mappers.spec.js)
- nestest and AccuracyCoin ROM harnesses
Missing test files for:
- PPU: register behavior, VRAM mirroring, sprite evaluation, scrolling, palette
- APU: channel behavior, frame counter, mixer, sweep unit
- Controllers: turbo button logic, clock(), strobe protocol
- ROM parser: trainer ROMs, truncated data, NES 2.0 headers
- Mappers 1-241: MMC1, MMC3, MMC5, etc. have zero unit tests
- State serialization: no round-trip toJSON()/fromJSON() tests
- Browser layer: Screen, Speakers, KeyboardController, GamepadController
- GameGenie: decode/encode round-trip, invalid input handling
The highest-value additions would be:
- MMC3 IRQ counter unit tests (most complex and bug-prone mapper code)
- PPU register behavior tests
- State serialization round-trip tests
- APU sweep unit tests
Summary
Current test coverage is limited to:
cpu.spec.js)nes.spec.js)mappers.spec.js)Missing test files for:
The highest-value additions would be: