开玩笑的集成测试在管道上断裂

发布于 2025-02-12 18:10:08 字数 416 浏览 1 评论 0原文

您好,我试图使用JEST版本27.5.1以及Jest-CLI 27.5.1在我的Local主机上使用的Integrations测试在我的管道上构建应用程序,但是当我的代码通过管道运行时,请显示以下错误

FetchError: request to http://localhost/callback?usid=  failed, reason: connect ECONNREFUSED 127.0.0.1:80

而且,如果我在此测试中添加跳过,那么下一个测试中断,

我也尝试阅读Jest的文档,以查看问题的根源是否可以是语法,我更改了URL,我在其中im在做API的请求以及在函数AfterAfter()server.resethandlers()以及localstorage.clear()上添加了清除,以清除任何可能被视为旧数据的东西

Hello im trying to find to build a application on my pipeline using integrations tests with Jest version 27.5.1 as well as jest-cli 27.5.1 all the tests work on my localhost however when my code runs through the Pipeline it shows the following Error

FetchError: request to http://localhost/callback?usid=  failed, reason: connect ECONNREFUSED 127.0.0.1:80

and if i add a skip to this test the next test breaks as well

I've tried reading the documentation of jest to see if the root of the problem could be syntax i changed the Url where im doing the request for the API and also cleared added on the function afterEach() server.resetHandlers() as well as LocalStorage.clear() to clear up anything that might be considered Old data

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文