-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: update 404 with unocss, fix: tests
- Loading branch information
Showing
5 changed files
with
72 additions
and
100 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
import { useHead } from '@unhead/vue' | ||
import { shallowMount } from '@vue/test-utils' | ||
import { describe, expect, it, vi } from 'vitest' | ||
import Login from '../LoginPage.vue' | ||
|
||
vi.mock('@unhead/vue', () => ({ | ||
useHead: vi.fn(), | ||
})) | ||
|
||
describe('tests for LoginPage.vue', () => { | ||
const wrapper = shallowMount(Login) | ||
|
||
it('should be render correctly', () => { | ||
expect(wrapper.html()).toMatchSnapshot() | ||
}) | ||
|
||
it('should has correct head', () => { | ||
expect(useHead).toHaveBeenCalledWith({ | ||
title: 'Jenda | Login', | ||
}) | ||
}) | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
import { useHead } from '@unhead/vue' | ||
import { shallowMount } from '@vue/test-utils' | ||
import { describe, expect, it, vi } from 'vitest' | ||
import Registration from '../RegistrationPage.vue' | ||
|
||
vi.mock('@unhead/vue', () => ({ | ||
useHead: vi.fn(), | ||
})) | ||
|
||
describe('tests for RegistrationPage.vue', () => { | ||
const wrapper = shallowMount(Registration) | ||
|
||
it('should be render correctly', () => { | ||
expect(wrapper.html()).toMatchSnapshot() | ||
}) | ||
|
||
it('should has correct head', () => { | ||
expect(useHead).toHaveBeenCalledWith({ | ||
title: 'Jenda | Registration', | ||
}) | ||
}) | ||
}) |
23 changes: 1 addition & 22 deletions
23
core/client/src/pages/__tests__/__snapshots__/Login.spec.ts.snap
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
16 changes: 1 addition & 15 deletions
16
core/client/src/pages/__tests__/__snapshots__/Registration.spec.ts.snap
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters