Yugo
Yugo
try `NODE_ENV=db sequelize db:migrate` your config file object first level key should be NODE_ENV value. i spend lot‘s time find them. in source code https://github.com/sequelize/cli/blob/1c8983c69b921b2c43ecfc1062449bed143c22e8/src/core/yargs.js#L22 ``` return yargs .option('env', {...
恩,忘记当初是怎么测试的了。最主要还是 arg 引用被复用了 没有重置,而且返回值也不是函数。 修改成如下可以正常使用,你的解决方案也行,不过没那么容易理解,对读者要求有些高。 ``` function curry(fn) { const length = fn.length let _args = [] const invoke = (...args) => { _args = _args.concat(args); if (_args.length == length)...
see https://github.com/MiYogurt/egg-y-validator#verify-on-your-controller
感谢反馈。
恩 failure
```sh $ npm run test > [email protected] test C:\Users\雨果\Desktop\egg-msg-flash > npm run lint -- --fix && egg-bin pkgfiles && npm run test-local cd > [email protected] lint C:\Users\雨果\Desktop\egg-msg-flash > eslint ....
测试好像没法这样去测试,这样测试要黑河测试,白盒可以换一种方式。代码推上去了。
修改图书中的示例代码 router.js ```js router.get('/session1', async (ctx, next) => { ctx.flash_error({ ss: 'some error' }) ctx.body = ctx.session.flash }) router.get('/session3', async (ctx, next) => { ctx.flash = { type: 'warning', message:...
@ifyour 用这个用例去测试,ctx.flash 是下一次请求的时候才能拿得到,第一次 用 ctx.session 里面去拿,这样测试就可以了。
 去掉这一句话。