mirror of
https://github.com/IT4Change/gradido.git
synced 2025-12-13 07:45:54 +00:00
yarn test fixed
This commit is contained in:
parent
0ca0f49f3f
commit
53e25ab119
@ -8,6 +8,7 @@ const toastSuccessMock = jest.fn()
|
||||
const toastErrorMock = jest.fn()
|
||||
|
||||
const mocks = {
|
||||
$t: jest.fn((t) => t),
|
||||
$apollo: {
|
||||
mutate: apolloMutateMock,
|
||||
},
|
||||
@ -53,7 +54,7 @@ describe('ConfirmRegisterMailFormular', () => {
|
||||
|
||||
it('toasts a success message', () => {
|
||||
expect(toastSuccessMock).toBeCalledWith(
|
||||
'Erfolgreich senden der Confirmation Link an die E-Mail des Users! bob@baumeister.de',
|
||||
'unregister_mail.success',
|
||||
)
|
||||
})
|
||||
})
|
||||
@ -67,7 +68,7 @@ describe('ConfirmRegisterMailFormular', () => {
|
||||
|
||||
it('toasts an error message', () => {
|
||||
expect(toastErrorMock).toBeCalledWith(
|
||||
'Fehler beim senden des confirmation link an den Benutzer: OUCH!',
|
||||
'unregister_mail.error',
|
||||
)
|
||||
})
|
||||
})
|
||||
|
||||
@ -21,6 +21,7 @@ const toastedErrorMock = jest.fn()
|
||||
const toastedSuccessMock = jest.fn()
|
||||
|
||||
const mocks = {
|
||||
$t: jest.fn((t) => t),
|
||||
$moment: jest.fn(() => {
|
||||
return {
|
||||
format: jest.fn((m) => m),
|
||||
|
||||
@ -53,6 +53,7 @@ const apolloQueryMock = jest.fn().mockResolvedValue({
|
||||
const toastedErrorMock = jest.fn()
|
||||
|
||||
const mocks = {
|
||||
$t: jest.fn((t) => t),
|
||||
$apollo: {
|
||||
query: apolloQueryMock,
|
||||
},
|
||||
|
||||
@ -18,6 +18,7 @@ const stateCommitMock = jest.fn()
|
||||
const toastedErrorMock = jest.fn()
|
||||
|
||||
const mocks = {
|
||||
$t: jest.fn((t) => t),
|
||||
$moment: jest.fn(() => {
|
||||
return {
|
||||
format: jest.fn((m) => m),
|
||||
|
||||
@ -7,6 +7,7 @@ const storeDispatchMock = jest.fn()
|
||||
const routerPushMock = jest.fn()
|
||||
|
||||
const mocks = {
|
||||
$t: jest.fn((t) => t),
|
||||
$store: {
|
||||
state: {
|
||||
openCreations: 1,
|
||||
|
||||
@ -13,8 +13,12 @@ describe('UserTable', () => {
|
||||
creation: [],
|
||||
}
|
||||
|
||||
const mocks = {
|
||||
$t: jest.fn((t) => t),
|
||||
}
|
||||
|
||||
const Wrapper = () => {
|
||||
return mount(UserTable, { localVue, propsData })
|
||||
return mount(UserTable, { localVue, propsData, mocks })
|
||||
}
|
||||
|
||||
describe('mount', () => {
|
||||
|
||||
@ -28,6 +28,7 @@ const apolloQueryMock = jest.fn().mockResolvedValue({
|
||||
const toastErrorMock = jest.fn()
|
||||
|
||||
const mocks = {
|
||||
$t: jest.fn((t) => t),
|
||||
$apollo: {
|
||||
query: apolloQueryMock,
|
||||
},
|
||||
|
||||
@ -37,6 +37,7 @@ const apolloQueryMock = jest.fn().mockResolvedValue({
|
||||
const apolloMutateMock = jest.fn().mockResolvedValue({})
|
||||
|
||||
const mocks = {
|
||||
$t: jest.fn((t) => t),
|
||||
$store: {
|
||||
commit: storeCommitMock,
|
||||
},
|
||||
|
||||
@ -22,6 +22,7 @@ const apolloQueryMock = jest.fn().mockResolvedValue({
|
||||
const storeCommitMock = jest.fn()
|
||||
|
||||
const mocks = {
|
||||
$t: jest.fn((t) => t),
|
||||
$apollo: {
|
||||
query: apolloQueryMock,
|
||||
},
|
||||
|
||||
@ -20,6 +20,7 @@ const apolloQueryMock = jest.fn().mockResolvedValue({
|
||||
const toastErrorMock = jest.fn()
|
||||
|
||||
const mocks = {
|
||||
$t: jest.fn((t) => t),
|
||||
$apollo: {
|
||||
query: apolloQueryMock,
|
||||
},
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user