mirror of
https://github.com/Ocelot-Social-Community/Ocelot-Social.git
synced 2025-12-13 07:46:06 +00:00
coverage enter-nonce.spec.js
This commit is contained in:
parent
c76b549607
commit
ee7c4dc715
33
webapp/pages/password-reset/enter-nonce.spec.js
Normal file
33
webapp/pages/password-reset/enter-nonce.spec.js
Normal 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)
|
||||
})
|
||||
})
|
||||
})
|
||||
Loading…
x
Reference in New Issue
Block a user