Fixed javascript tests of Discovery
parent
554a9ac012
commit
d22e0bad4f
|
@ -28,6 +28,22 @@ describe "DiscoverSearch", ->
|
||||||
|
|
||||||
$provide.value "$translate", mocks.translate
|
$provide.value "$translate", mocks.translate
|
||||||
|
|
||||||
|
_mockTgLocation = () ->
|
||||||
|
mocks.mockTgLocation = {
|
||||||
|
url: sinon.stub()
|
||||||
|
search: sinon.stub()
|
||||||
|
}
|
||||||
|
|
||||||
|
$provide.value "$tgLocation", mocks.mockTgLocation
|
||||||
|
|
||||||
|
_mockTgAnalytics = () ->
|
||||||
|
mocks.tgAnalytics = {
|
||||||
|
trackEvent: sinon.stub(),
|
||||||
|
trackPage: sinon.stub()
|
||||||
|
}
|
||||||
|
|
||||||
|
$provide.value "$tgAnalytics", mocks.tgAnalytics
|
||||||
|
|
||||||
_mockAppMetaService = () ->
|
_mockAppMetaService = () ->
|
||||||
mocks.appMetaService = {
|
mocks.appMetaService = {
|
||||||
setAll: sinon.spy()
|
setAll: sinon.spy()
|
||||||
|
@ -63,6 +79,8 @@ describe "DiscoverSearch", ->
|
||||||
_mockAppMetaService()
|
_mockAppMetaService()
|
||||||
_mockRoute()
|
_mockRoute()
|
||||||
_mockRouteParams()
|
_mockRouteParams()
|
||||||
|
_mockTgLocation()
|
||||||
|
_mockTgAnalytics()
|
||||||
_mockDiscoverProjects()
|
_mockDiscoverProjects()
|
||||||
|
|
||||||
return null
|
return null
|
||||||
|
|
Loading…
Reference in New Issue