Fix using HttpService in e2e tests

HttpService did not work in e2e tests because Jest testEnvironment was
jsdom by default. HttpService threw NetworkError on each request because
axios uses XHR adapter instead of HTTP adapter in this environment.

Now, Jest testEnvironment is node.
This commit is contained in:
Riho Pihlak 2018-07-27 18:39:16 +03:00
parent cc3be2514d
commit 84b05d83ff
1 changed files with 1 additions and 0 deletions

View File

@ -1,6 +1,7 @@
{ {
"moduleFileExtensions": ["js", "json", "ts"], "moduleFileExtensions": ["js", "json", "ts"],
"rootDir": ".", "rootDir": ".",
"testEnvironment": "node",
"testRegex": ".e2e-spec.ts$", "testRegex": ".e2e-spec.ts$",
"transform": { "transform": {
"^.+\\.(t|j)s$": "ts-jest" "^.+\\.(t|j)s$": "ts-jest"