-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
egg test 返回的信息和egg-validate 返回的信息不一致 #3157
Comments
Hello @jxycbjhc. Please provide a reproducible example by creating a github repo. Issues labeled by |
app/controller/user.js
test/controller/user.test.js
|
用 |
这个应该是能反映问题的 [email protected]:jxycbjhc/egg-issue.git |
看了一下,测试用例好像不对?参考下面的测试用例。 |
@thonatos 不是太明白,这个是对egg-validate模块的测试文件,我想表达的是egg-validate模块提供的报错和在测试文件下的报错是不一致的。 |
@jxycbjhc 跑了你提供的代码,结果也确实和截图一样。 但是问题是,此处并没有按照 |
好的,看了下其他的issue ,#1086 看来是egg-onerror统一处理了。 |
在对controller中的文件写测试用例的时候,对于常见比如说登录这一块,比如验证邮箱没填写,egg-validate 对其进行校验时,返回的状态码是422,这个和在测试文件的结果一致,但是返回的数据两者有差异,我贴个截图吧
The text was updated successfully, but these errors were encountered: