[英]tool to test asynchronously loaded scripts in javascript
I'm giving my first steps with single wep page apps and RequireJs, and I noticed that quite often everything seems to work find locally, but when deployed on a remote server some errors appears at random, mainly because of async files being loaded and dependencies not being well defined. 我正在使用单个wep页面应用程序和RequireJs做我的第一步,我注意到很多时候似乎所有事情都可以在本地找到,但是当部署在远程服务器上时,随机会出现一些错误,这主要是由于异步文件正在加载和依赖定义不清。
(here's just an example https://groups.google.com/forum/#!topic/requirejs/skOZCi-3nFU/discussion ) (这只是一个示例https://groups.google.com/forum/#!topic/requirejs/skOZCi-3nFU/discussion )
I was wondering if there is some kind of tool that could run automated tests but forcing every script to be delayed, trying all possible combinations (I was thinking about some kind of proxy)... 我想知道是否有某种工具可以运行自动化测试,但会强制每个脚本延迟,尝试所有可能的组合(我在考虑某种代理)...
If there's no such thing, how do you test these kind of scenarios? 如果没有这种事情,您如何测试这种情况?
Have you looked into boilerplatejs . 你有没有看过boilerplatejs 。 This is a reference architecture which we are using with our single page java script applications.
这是我们与单页Java脚本应用程序一起使用的参考体系结构。 This will help you to manage your code in a more efficient manner.
这将帮助您以更有效的方式管理代码。 Have a look.
看一看。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.