Skip to content

Commit

Permalink
refactor: migrate util.js to TypeScript
Browse files Browse the repository at this point in the history
  • Loading branch information
koba04 committed May 11, 2022
1 parent d05136a commit 168d733
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions test/utils.js → test/utils.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
import { render as baseRender } from '@testing-library/react/pure';
import { render as baseRender, RenderOptions } from '@testing-library/react/pure';
import React from 'react';

export * from '@testing-library/react';
export function render(element, options) {
export function render(element: React.ReactElement, options?: RenderOptions) {
const result = baseRender(element, options);

return {
...result,
setProps(props) {
setProps(props: any) {
result.rerender(React.cloneElement(element, props));
},
};
Expand Down

0 comments on commit 168d733

Please sign in to comment.