fix volatile unit tests: move initialization of spooky into beforeAll() and change global variables to lazy