Skip to content
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

高级mock脚本无法正常运行 #42

Open
HHH1994 opened this issue Aug 3, 2021 · 2 comments
Open

高级mock脚本无法正常运行 #42

HHH1994 opened this issue Aug 3, 2021 · 2 comments

Comments

@HHH1994
Copy link

HHH1994 commented Aug 3, 2021

问题: 高级mock脚本无法运行
原因: 经过测试发现safeify的代码执行后,不会修改sandbox中的对应的属性

求fix

@zxh0907
Copy link

zxh0907 commented Sep 8, 2021

请问你解决了吗?遇到同样的问题

@qaz3954179
Copy link

经测试把 script.result.global = null; 加到runner.js 的 17行下面可以解决报错的问题。但是Random 里面的方法都是返回的Promise形式,还是有问题。最终修改了yapi,使用了 node 原生的 vm

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants