Skip to content

Instantly share code, notes, and snippets.

@theotherzach
Last active November 5, 2016 21:57
Show Gist options
  • Save theotherzach/cf93716c4c026a443f2e8117bc1f3783 to your computer and use it in GitHub Desktop.
Save theotherzach/cf93716c4c026a443f2e8117bc1f3783 to your computer and use it in GitHub Desktop.
describe("Address", function () {
var app = window.app
var store = window.jQuery.extend({}, app.store)
var Address = Object.assign({}, app.components.Address)
var vm = null
beforeEach(function () {
spyOn(app.services.ordersService, 'get').and
.returnValue(new Promise(function() {}))
Address.template = "<div></div>"
var appInstance = new Vue({
template: "<div><child :address='address' :server-errors='serverErrors'></child></div>",
data: {
address: makeAddressFixture(),
serverErrors: {}
},
components: {
"child": Address
},
store: new Vuex.Store(store)
}).$mount()
vm = appInstance.$children[0]
})
it("doesn't blow up", function () {
expect(vm).toBeDefined()
})
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment