An attempt at using CircleCI
with Zeit's Now
and Typescript
.
-
Connection for HTTP requests in tests are always refused when run in CircleCI but not when the tests are run locally.
-
It seems that
jest
setsNODE_ENV
totest
by default. source:stackoverflow
- Switching between localhost and 127.0.0.1 in the target url.
- Using the
beforeAll(() => {})
call in one of the jest tests.
- Adding the
.now
folder fields to the CircleCI build environment to make the 'project not linked to NOW' error field go away.
- Found this link that gets an ip address. It looks promising.
SOLN: 32 commits later and it works. You need two commands instead of one.
$ now dev --listen 8080 & wait-on tcp:8080 $ npm run test