-
Notifications
You must be signed in to change notification settings - Fork 0
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
Showing
15 changed files
with
92 additions
and
31 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
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 |
---|---|---|
|
@@ -70,8 +70,5 @@ | |
"vitest": "^0.29.1", | ||
"vue-loader": "^16.8.3", | ||
"vue-tsc": "^1.2.0" | ||
}, | ||
"workspaces": [ | ||
"./libs/ui" | ||
] | ||
} | ||
} |
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 |
---|---|---|
@@ -1,5 +1,4 @@ | ||
<script setup lang="ts"> | ||
</script> | ||
<script setup lang="ts"></script> | ||
|
||
<template> | ||
<RouterView /> | ||
|
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 |
---|---|---|
@@ -1 +1 @@ | ||
export * from '../router'; | ||
export * from '../router' |
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 |
---|---|---|
@@ -1,22 +1,25 @@ | ||
import Title from '../components/title.vue'; | ||
import { Meta, Canvas, Story } from '@storybook/addon-docs'; | ||
import Title from '../components/title.vue' | ||
import { Meta, Canvas, Story } from '@storybook/addon-docs' | ||
|
||
<Meta title="Example/Button" component={Title} /> | ||
|
||
export const Template = (args) => ({ | ||
components: { Title }, | ||
setup() { | ||
return { args }; | ||
return { args } | ||
}, | ||
template: '<Title v-bind="args" />', | ||
}); | ||
|
||
template: '<Title v-bind="args" />' | ||
}) | ||
|
||
# Primary Button | ||
|
||
<Canvas> | ||
<Story name="Primary" args={{ | ||
title: "Hello from title" | ||
}}> | ||
<Story | ||
name="Primary" | ||
args={{ | ||
title: 'Hello from title' | ||
}} | ||
> | ||
{Template.bind({})} | ||
</Story> | ||
</Canvas> | ||
</Canvas> |
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,29 @@ | ||
import Counter from '../components/counter.vue' | ||
import { mount, VueWrapper } from '@vue/test-utils' | ||
import { useExampleStore } from '../stores/example' | ||
|
||
describe('Example Counter', () => { | ||
let wrapper: VueWrapper | ||
let exampleStore: ReturnType<typeof useExampleStore> | ||
beforeEach(() => { | ||
setActivePinia(createPinia()) | ||
wrapper = mount(Counter) | ||
exampleStore = useExampleStore() | ||
}) | ||
|
||
it('should render currectly', () => { | ||
expect(wrapper.html()).toContain('0') | ||
}) | ||
|
||
it('should increment', async () => { | ||
exampleStore.increase() | ||
await wrapper.find('[data-test="inc"]').trigger('click') | ||
expect(wrapper.get('[data-test="result"]').text()).toBe('4') | ||
}) | ||
|
||
it('should decrement', async () => { | ||
exampleStore.decrease() | ||
await wrapper.find('[data-test="dec"]').trigger('click') | ||
expect(wrapper.get('[data-test="result"]').text()).toBe('4') | ||
}) | ||
}) |
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 |
---|---|---|
@@ -1,3 +1,3 @@ | ||
@tailwind base; | ||
@tailwind components; | ||
@tailwind utilities; | ||
@tailwind utilities; |
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 |
---|---|---|
@@ -1,5 +1,6 @@ | ||
declare namespace React { | ||
interface HTMLAttributes<T> extends AriaAttributes, DOMAttributes<T> { | ||
class?: string | ||
dataTest?: string | ||
} | ||
} |
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
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
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