Fix #13: Add proper detection of Promise capabilities in tests