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:
@@ -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"
|
||||||
|
|||||||
Reference in New Issue
Block a user