remove vue toasted

This commit is contained in:
Moriz Wahl 2022-02-16 08:21:39 +01:00
parent 84d2b9459d
commit b4d0f5cbed
2 changed files with 0 additions and 32 deletions

View File

@ -1,7 +1,6 @@
import GlobalComponents from './globalComponents'
import GlobalDirectives from './globalDirectives'
import Toasted from 'vue-toasted'
import PortalVue from 'portal-vue'
// vue-bootstrap
@ -30,16 +29,5 @@ export default {
Vue.use(FlatPickr)
Vue.use(Loading)
Vue.use(VueApollo)
Vue.use(Toasted, {
position: 'top-center',
duration: 5000,
fullWidth: true,
action: {
text: 'x',
onClick: (e, toastObject) => {
toastObject.goAway(0)
},
},
})
},
}

View File

@ -4,13 +4,10 @@ import Vue from 'vue'
import GlobalComponents from './globalComponents'
import GlobalDirectives from './globalDirectives'
import Toasted from 'vue-toasted'
import './assets/scss/app.scss'
jest.mock('./globalComponents')
jest.mock('./globalDirectives')
jest.mock('vue-toasted')
jest.mock('vue')
@ -27,21 +24,4 @@ describe('dashboard plugin', () => {
it('installs the global directives', () => {
expect(vueUseMock).toBeCalledWith(GlobalDirectives)
})
describe('vue toasted', () => {
const toastedAction = vueUseMock.mock.calls[9][1].action.onClick
const goAwayMock = jest.fn()
const toastObject = {
goAway: goAwayMock,
}
it('installs vue toasted', () => {
expect(vueUseMock).toBeCalledWith(Toasted, expect.anything())
})
it('onClick calls goAway(0)', () => {
toastedAction({}, toastObject)
expect(goAwayMock).toBeCalledWith(0)
})
})
})