【发布时间】:2012-01-09 21:05:29
【问题描述】:
我在这样的 Backbone 模型中使用 google.maps 库(coffeescript):
class Route extends Backbone.Model
initialize: ->
@directionsService = new google.maps.DirectionsService()
在我的测试中,每当我尝试实例化 Route 时,显然都会遇到问题。如何在我的测试中将 google 存根,以免导致此问题?
【问题讨论】:
标签: javascript google-maps backbone.js jasmine sinon