-
-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
f5ee3b0
commit 9610fff
Showing
2 changed files
with
33 additions
and
1 deletion.
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,32 @@ | ||
import { BaseAvatar } from '#components' | ||
import { mount } from '@vue/test-utils' | ||
import { beforeEach, describe, expect, it } from 'vitest' | ||
import { resetNuiAppConfig } from '../../utils' | ||
|
||
describe('component: BaseAvatar', () => { | ||
describe('rendering', () => { | ||
beforeEach(() => resetNuiAppConfig('BaseAvatar')) | ||
|
||
it('should render with custom app.config', async () => { | ||
// useAppConfig().nui.BaseAvatar!.color = 'primary' | ||
useAppConfig().nui.BaseAvatar!.size = 'xl' | ||
useAppConfig().nui.BaseAvatar!.rounded = 'lg' | ||
|
||
const component = mount(BaseAvatar) | ||
|
||
const wrapper = component.get('.nui-avatar') | ||
// expect(wrapper.classes('nui-avatar-muted')).toBeTruthy() | ||
expect(wrapper.classes('nui-avatar-xl')).toBeTruthy() | ||
expect(wrapper.classes('nui-avatar-rounded-lg')).toBeTruthy() | ||
}) | ||
|
||
it('should render with default app.config', async () => { | ||
const component = mount(BaseAvatar) | ||
|
||
const wrapper = component.get('.nui-avatar') | ||
// expect(wrapper.classes('nui-avatar-muted')).toBeTruthy() | ||
expect(wrapper.classes('nui-avatar-sm')).toBeTruthy() | ||
expect(wrapper.classes('nui-avatar-rounded-full')).toBeTruthy() | ||
}) | ||
}) | ||
}) |