经过大量研究和反复试验,我选择了以下堆栈进行前端BDD测试:cucumber.jsCasperJS(通过SpookyJS)幻影我想避免CasperJS运行队列并直接使用PhantomJS(通过phantom-proxy)并在每个步骤中使用回调:@World=(cb)->@phantom=require"phantom-proxy"cb()@Before(cb)->
[email protected]{},(proxy)->self.proxy=proxyself.page=proxy.pagecb()@After(cb)->@prox