Skip to content

Commit 3dbb1c2

Browse files
authored
chore: fix updated ESLint rules (testing-library#188)
1 parent 75e0111 commit 3dbb1c2

File tree

3 files changed

+8
-4
lines changed

3 files changed

+8
-4
lines changed

src/__tests__/validate-plugin.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ test('can validate using plugin', async () => {
1616
)
1717

1818
// Assert error messages are not in the DOM when rendering the component.
19-
expect(queryByTestId('username-errors')).toBeNull()
19+
expect(queryByTestId('username-errors')).not.toBeInTheDocument()
2020

2121
const usernameInput = getByPlaceholderText('Username...')
2222
await fireEvent.touch(usernameInput)

src/__tests__/vue-i18n.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -36,5 +36,5 @@ test('renders translations', async () => {
3636

3737
expect(getByText('こんにちは')).toBeInTheDocument()
3838

39-
expect(queryByText('Hello')).toBeNull()
39+
expect(queryByText('Hello')).not.toBeInTheDocument()
4040
})

types/index.d.ts

+6-2
Original file line numberDiff line numberDiff line change
@@ -46,12 +46,16 @@ export interface RenderOptions<V extends Vue, S = {}>
4646
baseElement?: Element
4747
}
4848

49-
export type ConfigurationCallback<V extends Vue> = (
49+
type ConfigurationArgs = [
5050
localVue: typeof Vue,
5151
// eslint-disable-next-line @typescript-eslint/no-explicit-any
5252
store: Store<any>,
5353
router: Router,
54-
) => Partial<ThisTypedMountOptions<V>> | void
54+
]
55+
56+
export type ConfigurationCallback<V extends Vue> =
57+
| ((...args: ConfigurationArgs) => Partial<ThisTypedMountOptions<V>>)
58+
| ((...args: ConfigurationArgs) => void)
5559

5660
export function render<V extends Vue>(
5761
TestComponent: VueClass<V> | ComponentOptions<V>,

0 commit comments

Comments
 (0)