Skip to content
This repository was archived by the owner on Sep 20, 2024. It is now read-only.

Commit 0a7efcf

Browse files
committed
test(input): add tests for input components
1 parent 778bb17 commit 0a7efcf

File tree

304 files changed

+4256
-3619
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

304 files changed

+4256
-3619
lines changed

.eslintrc.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ parserOptions:
1515
sourceType: module
1616
plugins:
1717
- '@typescript-eslint'
18-
rules:
18+
rules:
1919
'@typescript-eslint/member-delimiter-style':
2020
- error
2121
- multiline:

.prettierrc.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# .prettierrc or .prettierrc.yaml
2-
trailingComma: "es5"
2+
trailingComma: 'es5'
33
tabWidth: 2
44
semi: false
5-
singleQuote: true
5+
singleQuote: false

components.d.ts

Lines changed: 147 additions & 146 deletions
Large diffs are not rendered by default.

examples/vue-ssr/src/main.ts

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
import App from './App.vue'
2-
import viteSSR from 'vite-ssr'
3-
import { createHead } from '@vueuse/head'
4-
import routes from 'virtual:generated-pages'
5-
import Chakra, { chakra } from '@chakra-ui/vue-next'
6-
import { hydrate } from '@emotion/css'
7-
import { domElements } from '@chakra-ui/vue-system'
8-
import { extractCritical } from '@emotion/server'
1+
import App from "./App.vue"
2+
import viteSSR from "vite-ssr"
3+
import { createHead } from "@vueuse/head"
4+
import routes from "virtual:generated-pages"
5+
import Chakra, { chakra } from "@chakra-ui/vue-next"
6+
import { hydrate } from "@emotion/css"
7+
import { domElements } from "@chakra-ui/vue-system"
8+
import { extractCritical } from "@emotion/server"
99

1010
/**
1111
*
@@ -16,12 +16,12 @@ import { extractCritical } from '@emotion/server'
1616
const injectCritical = (html: string, ids: string[], css: string) =>
1717
html
1818
.replace(
19-
'</title>\n',
19+
"</title>\n",
2020
`</title>\n<script>window.$emotionSSRIds=${JSON.stringify(
2121
ids
2222
)}</script>\n`
2323
)
24-
.replace('</head>\n', `<style>${css}</style>\n</head>\n`)
24+
.replace("</head>\n", `<style>${css}</style>\n</head>\n`)
2525

2626
export default viteSSR(App, { routes }, ({ app, isClient }) => {
2727
/* custom logic */

examples/vue-ssr/src/shims-vue.d.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
declare module '*.vue' {
2-
import { DefineComponent } from 'vue'
1+
declare module "*.vue" {
2+
import { DefineComponent } from "vue"
33
const component: DefineComponent<{}, {}, any>
44
export default component
55
}
66

7-
declare module 'virtual:generated-pages' {
8-
import { RouteRecordRaw } from 'vue-router'
7+
declare module "virtual:generated-pages" {
8+
import { RouteRecordRaw } from "vue-router"
99
const routes: RouteRecordRaw[]
1010
export default routes
1111
}

examples/vue-ssr/vite.config.ts

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
1-
import { defineConfig } from 'vite'
2-
import vue from '@vitejs/plugin-vue'
3-
import viteSSR from 'vite-ssr/plugin.js'
4-
import Pages from 'vite-plugin-pages'
5-
import Components from 'unplugin-vue-components'
6-
import { componentResolver } from '@chakra-ui/vue-auto-import'
1+
import { defineConfig } from "vite"
2+
import vue from "@vitejs/plugin-vue"
3+
import viteSSR from "vite-ssr/plugin.js"
4+
import Pages from "vite-plugin-pages"
5+
import Components from "unplugin-vue-components"
6+
import { componentResolver } from "@chakra-ui/vue-auto-import"
77

88
// https://vitejs.dev/config/
99
export default defineConfig({
1010
plugins: [
1111
vue(),
1212
viteSSR(),
1313
Pages({
14-
pagesDir: 'src/pages',
15-
extensions: ['vue', 'ts', 'tsx'],
14+
pagesDir: "src/pages",
15+
extensions: ["vue", "ts", "tsx"],
1616
}),
1717
Components({
1818
customComponentResolvers: [componentResolver],

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -150,9 +150,9 @@
150150
"tinycolor2": "^1.4.2",
151151
"ts-jest": "^26.5.0",
152152
"ts-node": "^9.0.0",
153-
"typescript": "^4.4.3",
153+
"typescript": "^4.5.4",
154154
"unplugin-vue-components": "^0.14.0",
155-
"vite": "^2.7.1",
155+
"vite": "^2.7.4",
156156
"vite-plugin-mdx-vue": "^1.1.3",
157157
"vite-plugin-pages": "^0.18.2",
158158
"vite-plugin-vue-layouts": "^0.3.1",

packages/c-accordion/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
export * from './src'
1+
export * from "./src"

packages/c-accordion/src/index.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
1-
import { h, defineComponent, PropType } from 'vue'
2-
import { chakra, DOMElements } from '@chakra-ui/vue-system'
1+
import { h, defineComponent, PropType } from "vue"
2+
import { chakra, DOMElements } from "@chakra-ui/vue-system"
33

44
const CAccordion = defineComponent({
55
props: {
66
as: {
77
type: [String] as PropType<DOMElements>,
8-
default: 'div',
8+
default: "div",
99
},
1010
},
1111
setup(props, { slots, attrs }) {
1212
return () =>
13-
h(chakra(props.as, { label: 'accordion' }), { ...attrs }, slots)
13+
h(chakra(props.as, { label: "accordion" }), { ...attrs }, slots)
1414
},
1515
})
1616

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
import CAccordion from '../src'
2-
import { h } from 'vue'
1+
import CAccordion from "../src"
2+
import { h } from "vue"
33

4-
it('should render properly', () => {
4+
it("should render properly", () => {
55
cy.mount(<CAccordion></CAccordion>)
66
})

0 commit comments

Comments
 (0)