Description
TCP transport unit tests have excellent coverage (94.05% statements), but several error paths are not tested.
Missing Unit Tests
1. Write Operations Without Handler
Lines not covered: tcp.ts:174, 214, 250
setRegister without request handler
setRegisterArray without request handler
setCoil without request handler
getDiscreteInput without request handler
2. Coil and Discrete Input Integration Tests
Missing from emulator.tcp.integration.test.ts:
- Read coils (getCoil)
- Write single coil (setCoil)
- Read discrete inputs (getDiscreteInput)
Expected Coverage Increase
Current: 94.05% statements, 81.57% branches
Target: 95%+ statements, 85%+ branches
Adding 7 tests should cover the missing error paths and bring coverage above 95%.
Acceptance Criteria
Related
Description
TCP transport unit tests have excellent coverage (94.05% statements), but several error paths are not tested.
Missing Unit Tests
1. Write Operations Without Handler
Lines not covered: tcp.ts:174, 214, 250
setRegisterwithout request handlersetRegisterArraywithout request handlersetCoilwithout request handlergetDiscreteInputwithout request handler2. Coil and Discrete Input Integration Tests
Missing from
emulator.tcp.integration.test.ts:Expected Coverage Increase
Current: 94.05% statements, 81.57% branches
Target: 95%+ statements, 85%+ branches
Adding 7 tests should cover the missing error paths and bring coverage above 95%.
Acceptance Criteria
Related