coverage enter-nonce.spec.js

This commit is contained in:
Ulf Gebhardt 2021-04-25 19:03:31 +02:00
parent c76b549607
commit ee7c4dc715
No known key found for this signature in database
GPG Key ID: 81308EFE29ABFEBD

View File

@ -0,0 +1,33 @@
import { config, mount } from '@vue/test-utils'
import enterNonce from './enter-nonce.vue'
const localVue = global.localVue
config.stubs['nuxt-link'] = '<span class="nuxt-link"><slot /></span>'
describe('enter-nonce.vue', () => {
let wrapper
let mocks
beforeEach(() => {
mocks = {
$t: jest.fn(),
$route: {
query: jest.fn().mockResolvedValue({ email: 'peter@lustig.de' }),
},
}
})
describe('mount', () => {
const Wrapper = () => {
return mount(enterNonce, { mocks, localVue })
}
beforeEach(() => {
wrapper = Wrapper()
})
it('renders', () => {
expect(wrapper.findAll('.ds-form')).toHaveLength(1)
})
})
})