Fix tests to run in environments without native promises or indexeddb