egg-mock
egg-mock copied to clipboard
feat: change backgroundTasksFinished method from private to public
Checklist
- [ ]
npm testpasses - [ ] tests and/or benchmarks are included
- [ ] documentation is changed or added
- [x] commit message follows commit guidelines
Affected core subsystem(s)
Description of change
有时候需要测试 background tasks 执行完后的结果,将此方法改为 public 会比较方便
测试的错误是 tegg 的改动导致的 https://github.com/eggjs/tegg/pull/134/files#diff-97efa9b06dbc5312f138edf04f2e93055be52ce908ee060f2dabbbb6d575e941
简单看了下好像是 tegg 不允许调用两次 mockModuleContext,与 egg-mock 的 inject_context 功能相矛盾了?不知道我的猜测是否正确,仅供参考。