That's mighty weird but looks like you're right. I tried moving the var declaration into the factory's scope, and all tests passed *except* the "should get a list of devices with a callback" which for some reason couldn't find XMLHTTPRequest though all other tests could. Reverting for now.