diff --git a/src/__tests__/validate-plugin.js b/src/__tests__/validate-plugin.js index 725ece8b..5ebdf409 100644 --- a/src/__tests__/validate-plugin.js +++ b/src/__tests__/validate-plugin.js @@ -16,7 +16,7 @@ test('can validate using plugin', async () => { ) // Assert error messages are not in the DOM when rendering the component. - expect(queryByTestId('username-errors')).toBeNull() + expect(queryByTestId('username-errors')).not.toBeInTheDocument() const usernameInput = getByPlaceholderText('Username...') await fireEvent.touch(usernameInput) diff --git a/src/__tests__/vue-i18n.js b/src/__tests__/vue-i18n.js index 45f2ba7e..381a2736 100644 --- a/src/__tests__/vue-i18n.js +++ b/src/__tests__/vue-i18n.js @@ -36,5 +36,5 @@ test('renders translations', async () => { expect(getByText('こんにちは')).toBeInTheDocument() - expect(queryByText('Hello')).toBeNull() + expect(queryByText('Hello')).not.toBeInTheDocument() }) diff --git a/types/index.d.ts b/types/index.d.ts index d7da0690..cedc5340 100644 --- a/types/index.d.ts +++ b/types/index.d.ts @@ -46,12 +46,16 @@ export interface RenderOptions baseElement?: Element } -export type ConfigurationCallback = ( +type ConfigurationArgs = [ localVue: typeof Vue, // eslint-disable-next-line @typescript-eslint/no-explicit-any store: Store, router: Router, -) => Partial> | void +] + +export type ConfigurationCallback = + | ((...args: ConfigurationArgs) => Partial>) + | ((...args: ConfigurationArgs) => void) export function render( TestComponent: VueClass | ComponentOptions,