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

Commit 1357321

Browse files
committed
ci: link preconstruct for tests
1 parent 215fc0d commit 1357321

File tree

5 files changed

+12
-11
lines changed

5 files changed

+12
-11
lines changed

@types/components.d.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
*
77
* This is a generated file. Do not edit it's contents.
88
*
9-
* This file was generated on 2023-01-23T09:41:37.527Z
9+
* This file was generated on 2023-01-24T10:19:38.029Z
1010
*/
1111

1212
import { ChakraProps, chakra } from "@chakra-ui/vue-system"
@@ -68,6 +68,8 @@ declare module "@vue/runtime-core" {
6868
CAlertDescription: typeof import("@chakra-ui/vue-next")["CAlertDescription"]
6969
CAlertIcon: typeof import("@chakra-ui/vue-next")["CAlertIcon"]
7070
CAlertTitle: typeof import("@chakra-ui/vue-next")["CAlertTitle"]
71+
CAvatar: typeof import("@chakra-ui/vue-next")["CAvatar"]
72+
CAvatarBadge: typeof import("@chakra-ui/vue-next")["CAvatarBadge"]
7173
CBreadcrumb: typeof import("@chakra-ui/vue-next")["CBreadcrumb"]
7274
CBreadcrumbItem: typeof import("@chakra-ui/vue-next")["CBreadcrumbItem"]
7375
CBreadcrumbLink: typeof import("@chakra-ui/vue-next")["CBreadcrumbLink"]

components.d.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
*
77
* This is a generated file. Do not edit it's contents.
88
*
9-
* This file was generated on 2023-01-23T09:41:37.527Z
9+
* This file was generated on 2023-01-24T10:19:38.029Z
1010
*/
1111

1212
import { ChakraProps, chakra } from "@chakra-ui/vue-system"
@@ -68,6 +68,8 @@ declare module "@vue/runtime-core" {
6868
CAlertDescription: typeof import("@chakra-ui/vue-next")["CAlertDescription"]
6969
CAlertIcon: typeof import("@chakra-ui/vue-next")["CAlertIcon"]
7070
CAlertTitle: typeof import("@chakra-ui/vue-next")["CAlertTitle"]
71+
CAvatar: typeof import("@chakra-ui/vue-next")["CAvatar"]
72+
CAvatarBadge: typeof import("@chakra-ui/vue-next")["CAvatarBadge"]
7173
CBreadcrumb: typeof import("@chakra-ui/vue-next")["CBreadcrumb"]
7274
CBreadcrumbItem: typeof import("@chakra-ui/vue-next")["CBreadcrumbItem"]
7375
CBreadcrumbLink: typeof import("@chakra-ui/vue-next")["CBreadcrumbLink"]

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,9 +53,9 @@
5353
"cy:open": "cypress open",
5454
"cy:run": "cypress run --component --quiet",
5555
"test:component": "yarn cy:run",
56-
"test": "jest",
56+
"test": "jest && yarn cy:run",
5757
"test:silent": "cross-env NODE_ENV=test jest --verbose --silent --config jest.config.js",
58-
"test:ci": "yarn test:silent && yarn cy:run",
58+
"test:ci": "yarn dev && yarn test:silent && yarn cy:run",
5959
"test:unit": "cross-env NODE_ENV=test jest --config jest.config.js",
6060
"lint": "eslint '*/**/*.{js,ts,tsx}' --quiet --fix",
6161
"docs:dev:legacy": "vitepress dev docs",

packages/c-image/src/use-image.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -103,8 +103,6 @@ export function useImage(props: UseImageProps) {
103103
}
104104
})
105105

106-
watchEffect(() => console.debug("status", status.value))
107-
108106
/**
109107
* If user opts out of the fallback/placeholder
110108
* logic, let's just return 'loaded'

packages/test-utils/src/render.ts

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,14 @@ import "@testing-library/jest-dom"
44
import "@testing-library/jest-dom/extend-expect"
55
import * as vtl from "@testing-library/vue"
66
import userEvent from "@testing-library/user-event"
7-
import { Component, computed, defineComponent, h, provide, ref } from "vue"
7+
import { Component, computed, defineComponent, h, provide, ref, Ref } from "vue"
88
import { toHaveNoViolations, axe } from "jest-axe"
99
import { RunOptions } from "axe-core"
1010
import { AppColorModeContextSymbol } from "@chakra-ui/c-color-mode"
1111

1212
expect.extend(toHaveNoViolations)
1313

14-
const colorMode = ref("light")
15-
16-
const useDefaultProviders = () => {
14+
const useDefaultProviders = (colorMode: Ref<"light" | "dark">) => {
1715
provide("$chakraTheme", theme)
1816
provide(AppColorModeContextSymbol, {
1917
colorMode,
@@ -44,7 +42,8 @@ export const render = (
4442
defineComponent({
4543
name: "ChakraUIVueTestContainer",
4644
setup(_, { slots }) {
47-
useDefaultProviders()
45+
const colorMode = ref<"light" | "dark">("light")
46+
useDefaultProviders(colorMode)
4847
return () => h(component as any, {}, slots)
4948
},
5049
}),

0 commit comments

Comments
 (0)