我爱占星网 我爱占星网
首页
编程
java
php
前端
首页 编程 java php 前端

与Gingko和Gomega一起使用Withmock

Is it possible to use both withmock and Ginkgo in the same suite of Golang tests?

We've tried to run withmock ginkgo -r to run our tests, but it appears that withmock is polluting the namespace of the current block, presumably by doing 'dot imports' under the hood.

We get errors similar to the following:

.../broker/broker_suite_test.go:7: EXPECT redeclared during import "github.com/onsi/gomega"
    previous declaration during import "github.com/onsi/ginkgo"

近期文章

  • Golang Liteide-无法解析动作
  • 如何使LiteIDE显示* big.Int(或您的类型)的用户友好手表字符串?
  • 将结构字段参数传递给函数
  • 将字符串切片try索引方法抽象为所有切片类型
  • Appengine数据存储已损坏,如何重置
  • 方法接收者是否作为指针之间的区别
  • mgo ony最后一个JSON条目
  • Go http无法处理没有PATH的HTTP请求
  • Go和Mongodb:mgo中要评估的参数(mongodb驱动程序)
  • UTF-8和mymysql包
  • too long
  • 缓冲区结束和超时
  • 转码流的MIME类型
  • 在docker容器内使用“读取目录。:输入/输出错误”时,golang:sshfs -o重新连接失败
  • 遍历所有可能的字节
  • go get:JSON输入意外结束
  • 在VS Code中调试项目时出错的gopath
  • Golang:SetCookie不会更新到期时间
  • 如何将Go Dep与GitLab子组一起使用
  • 尝试注入依赖项时出错

Copyright ©2022 我爱占星 All Rights Reserved.

浙ICP备2022030071号-1

部分图文来自网络,如有侵犯您的版权,请告诉我们删除

友情链接:代码精华