Open welelay opened 8 years ago
I can't do it from client using $.get because the endpoint redirects to another domain without CORS headers.
@welelay Have you tried es6-promise
npm package?
Yes, with no success:
var p = require("es6-promise");
on top of the test script fails with
Error: Cannot find module 'es6-promise'
at Function.Module._resolveFilename (module.js:338:15)
at Function.Module._load (module.js:280:25)
at Module.require (module.js:364:17)
at require (module.js:380:17)
at Object.<anonymous> (/app/tests/gagarin/api_test.js:6:9)
@welelay Does installing es6-promise
globally help?
nope
@welelay Can you please read the discussion at #141 and see if it's helpful.
I'd like to test a rest api with gagarin. I figured I could use the 'http' module of node.js. No big deal :
require('http');
at begining of test files. But then, I have to return a promise in my test, likeIt fails with
Promise is undefined
. I can't find a way to grab promise from meteor, or with a require.