You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have searched for existing issues that already report this problem, without success.
Stencil Version
4.22.2
Current Behavior
An error is displayed when importing Axios in spec / e2e file.
No problem at runtime in the application.
FAIL src/services/user.service.spec.ts
● Test suite failed to run
TypeError: Invalid URL
> 1 | import axios from "axios";
| ^
2 | import { User, UserService } from "./user.service";
3 |
4 | describe('UserService', () => {
at MockAnchorElement.get pathname [as pathname] (node_modules/@stencil/core/mock-doc/index.cjs:7848:12)
at resolveURL (node_modules/axios/lib/helpers/isURLSameOrigin.js:41:35)
at standardBrowserEnv (node_modules/axios/lib/helpers/isURLSameOrigin.js:47:17)
at Object.<anonymous> (node_modules/axios/lib/helpers/isURLSameOrigin.js:60:4)
at Object.<anonymous> (src/services/user.service.spec.ts:1:1)
Expected Behavior
You should be able to test services while mocking Axios comportment without any problem.
Prerequisites
Stencil Version
4.22.2
Current Behavior
An error is displayed when importing Axios in spec / e2e file.
No problem at runtime in the application.
Expected Behavior
You should be able to test services while mocking Axios comportment without any problem.
System Info
Steps to Reproduce
Code Reproduction URL
https://github.com/zaaknafein/stencil-test
Additional Information
Maybe similar to this problem.
Dunno why this method is call on test initialization...
The text was updated successfully, but these errors were encountered: