Skip to content

Commit

Permalink
chpre: use beta 4
Browse files Browse the repository at this point in the history
  • Loading branch information
sheremet-va committed Aug 7, 2024
1 parent f3b232d commit 132b17f
Show file tree
Hide file tree
Showing 4 changed files with 65 additions and 80 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ test('counter button increments the count', async () => {
})
```

Unlike `@testing-library/vue`, `vitest-browser-vue` cleans up the component before the test starts instead of after, so you can see the rendered result in your UI.
Unlike `@testing-library/vue`, `vitest-browser-vue` cleans up the component before the test starts instead of after, so you can see the rendered result in your UI. To avoid auto-cleanup, import the `render` function from `vitest-browser-vue/pure`.

## Special thanks

Expand Down
13 changes: 6 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,27 +46,26 @@
"lint:fix": "pnpm lint --fix"
},
"peerDependencies": {
"@vitest/browser": "^2.1.0-beta.3",
"vitest": "^2.1.0-beta.3",
"@vitest/browser": "^2.1.0-beta.4",
"vitest": "^2.1.0-beta.4",
"vue": "^3.0.0"
},
"dependencies": {
"@vitest/pretty-format": "^2.1.0-beta.3",
"@vue/test-utils": "^2.4.6",
"vitest-browser-utils": "^0.0.1"
"@vitest/pretty-format": "^2.1.0-beta.4",
"@vue/test-utils": "^2.4.6"
},
"devDependencies": {
"@antfu/eslint-config": "^2.24.1",
"@vitejs/plugin-vue": "^5.1.2",
"@vitest/browser": "^2.1.0-beta.3",
"@vitest/browser": "^2.1.0-beta.4",
"bumpp": "^9.4.2",
"changelogithub": "^0.13.9",
"eslint": "^9.8.0",
"playwright": "^1.46.0",
"tsup": "^8.2.4",
"tsx": "^4.16.5",
"typescript": "^5.5.4",
"vitest": "^2.1.0-beta.3",
"vitest": "^2.1.0-beta.4",
"vue": "^3.4.35",
"zx": "^8.1.4"
}
Expand Down
126 changes: 56 additions & 70 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions src/pure.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import type { Locator, LocatorSelectors } from '@vitest/browser/context'
import { type ComponentMountingOptions, type VueWrapper, mount } from '@vue/test-utils'
import type { DefineComponent } from 'vue'
import { type PrettyFormatOptions, debug, getElementLocatorSelectors } from 'vitest-browser-utils'
import { type PrettyDOMOptions, debug, getElementLocatorSelectors } from '@vitest/browser/utils'

type ComponentProps<T> = T extends new (...angs: any) => {
$props: infer P
Expand All @@ -13,7 +13,7 @@ const mountedWrappers = new Set<VueWrapper>()
export interface Screen<Props> extends LocatorSelectors {
container: HTMLElement
baseElement: HTMLElement
debug(el?: HTMLElement | HTMLElement[] | Locator | Locator[], maxLength?: number, options?: PrettyFormatOptions): void
debug(el?: HTMLElement | HTMLElement[] | Locator | Locator[], maxLength?: number, options?: PrettyDOMOptions): void
unmount(): void
emitted<T = unknown>(): Record<string, T[]>
emitted<T = unknown[]>(eventName: string): undefined | T[]
Expand Down

0 comments on commit 132b17f

Please sign in to comment.