The WikibaseRepo.TermStoreWriterFactory service wiring uses the JobQueueGroup::singleton() function, which means that the unit test for that service wiring actually can’t run without MediaWiki being set up, because JobQueueGroup::singleton() uses the default MediaWiki service container.
A solution for this almost certainly requires T277648: JobQueueGroup::singleton() is difficult to use with dependency injection.
See also T281707.