Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions types/index.d.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
// Minimum TypeScript Version: 4.0
/* eslint-disable @typescript-eslint/no-explicit-any */

import {EmitsOptions} from 'vue'
import {MountingOptions} from '@vue/test-utils'
import {queries, EventType, BoundFunctions} from '@testing-library/dom'
// eslint-disable-next-line import/no-extraneous-dependencies
Expand All @@ -22,7 +21,7 @@ export interface RenderResult extends BoundFunctions<typeof queries> {
debug: Debug
unmount(): void
html(): string
emitted(): EmitsOptions
emitted<T = unknown>(): Record<string, T[]>
rerender(props: object): Promise<void>
}

Expand Down
5 changes: 5 additions & 0 deletions types/test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,11 @@ export function testOptions() {
})
}

export function testEmitted() {
const {emitted} = render(SomeComponent)
emitted().foo; // $ExpectType unknown[]
}

/*
eslint
testing-library/prefer-explicit-assert: "off",
Expand Down