mirror of
https://github.com/Ocelot-Social-Community/Ocelot-Social.git
synced 2025-12-13 07:46:06 +00:00
37 lines
666 B
JavaScript
37 lines
666 B
JavaScript
import { mount } from '@vue/test-utils'
|
|
import enterNonce from './enter-nonce.vue'
|
|
|
|
const localVue = global.localVue
|
|
|
|
const stubs = {
|
|
'nuxt-link': true,
|
|
}
|
|
|
|
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, stubs })
|
|
}
|
|
|
|
beforeEach(() => {
|
|
wrapper = Wrapper()
|
|
})
|
|
|
|
it('renders', () => {
|
|
expect(wrapper.findAll('.ds-form')).toHaveLength(1)
|
|
})
|
|
})
|
|
})
|