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
feat: 增加applicationContext中的ctx注入,支持mock ts类型定义的function #125
Conversation
* @param ctx ctx | ||
*/ | ||
updateContext(ctx) { | ||
this.ctx = Object.assign({}, ctx || {}); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这里不好吧。。。updateContext 挪过来做啥的?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
方便后续修改啊,mock使用
import * as assert from 'power-assert'; | ||
import { MidwayMock, MidwayMockApplication } from './src'; | ||
|
||
export { | ||
assert | ||
}; | ||
export declare const app: MidwayMockApplication; | ||
export declare const mock: MidwayMock; | ||
export declare const mm: MidwayMock; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这个删了 ci 会报错的。
Codecov Report
@@ Coverage Diff @@
## master #125 +/- ##
==========================================
+ Coverage 77.64% 79.54% +1.89%
==========================================
Files 59 61 +2
Lines 1991 2180 +189
Branches 313 351 +38
==========================================
+ Hits 1546 1734 +188
+ Misses 338 331 -7
- Partials 107 115 +8
Continue to review full report at Codecov.
|
Merge pull request #125 from midwayjs/context_refactor feat: 增加applicationContext中的ctx注入,支持mock ts类型定义的function
@czy88840616