Skip to content

Commit 3a99345

Browse files
author
Kent C. Dodds
authored
Merge branch 'master' into patch-1
2 parents 431731b + 3f1efbd commit 3a99345

File tree

4 files changed

+31
-3
lines changed

4 files changed

+31
-3
lines changed

.all-contributorsrc

+9
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,15 @@
4646
"contributions": [
4747
"doc"
4848
]
49+
},
50+
{
51+
"login": "Miklet",
52+
"name": "Paweł Mikołajczyk",
53+
"avatar_url": "https://avatars2.githubusercontent.com/u/12592677?v=4",
54+
"profile": "https://github.com/Miklet",
55+
"contributions": [
56+
"code"
57+
]
4958
}
5059
]
5160
}

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -354,7 +354,7 @@ Thanks goes to these people ([emoji key][emojis]):
354354
<!-- ALL-CONTRIBUTORS-LIST:START - Do not remove or modify this section -->
355355

356356
<!-- prettier-ignore -->
357-
| [<img src="https://avatars.githubusercontent.com/u/1500684?v=3" width="100px;"/><br /><sub><b>Kent C. Dodds</b></sub>](https://kentcdodds.com)<br />[💻](https://github.com/kentcdodds/react-testing-library/commits?author=kentcdodds "Code") [📖](https://github.com/kentcdodds/react-testing-library/commits?author=kentcdodds "Documentation") [🚇](#infra-kentcdodds "Infrastructure (Hosting, Build-Tools, etc)") [⚠️](https://github.com/kentcdodds/react-testing-library/commits?author=kentcdodds "Tests") | [<img src="https://avatars1.githubusercontent.com/u/2430381?v=4" width="100px;"/><br /><sub><b>Ryan Castner</b></sub>](http://audiolion.github.io)<br />[📖](https://github.com/kentcdodds/react-testing-library/commits?author=audiolion "Documentation") | [<img src="https://avatars0.githubusercontent.com/u/8008023?v=4" width="100px;"/><br /><sub><b>Daniel Sandiego</b></sub>](https://www.dnlsandiego.com)<br />[💻](https://github.com/kentcdodds/react-testing-library/commits?author=dnlsandiego "Code") | [<img src="https://avatars3.githubusercontent.com/u/464978?v=4" width="100px;"/><br /><sub><b>Alejandro Ñáñez Ortiz</b></sub>](http://co.linkedin.com/in/alejandronanez/)<br />[📖](https://github.com/kentcdodds/react-testing-library/commits?author=alejandronanez "Documentation") |
357+
| [<img src="https://avatars.githubusercontent.com/u/1500684?v=3" width="100px;"/><br /><sub><b>Kent C. Dodds</b></sub>](https://kentcdodds.com)<br />[💻](https://github.com/kentcdodds/react-testing-library/commits?author=kentcdodds "Code") [📖](https://github.com/kentcdodds/react-testing-library/commits?author=kentcdodds "Documentation") [🚇](#infra-kentcdodds "Infrastructure (Hosting, Build-Tools, etc)") [⚠️](https://github.com/kentcdodds/react-testing-library/commits?author=kentcdodds "Tests") | [<img src="https://avatars1.githubusercontent.com/u/2430381?v=4" width="100px;"/><br /><sub><b>Ryan Castner</b></sub>](http://audiolion.github.io)<br />[📖](https://github.com/kentcdodds/react-testing-library/commits?author=audiolion "Documentation") | [<img src="https://avatars0.githubusercontent.com/u/8008023?v=4" width="100px;"/><br /><sub><b>Daniel Sandiego</b></sub>](https://www.dnlsandiego.com)<br />[💻](https://github.com/kentcdodds/react-testing-library/commits?author=dnlsandiego "Code") | [<img src="https://avatars3.githubusercontent.com/u/464978?v=4" width="100px;"/><br /><sub><b>Alejandro Ñáñez Ortiz</b></sub>](http://co.linkedin.com/in/alejandronanez/)<br />[📖](https://github.com/kentcdodds/react-testing-library/commits?author=alejandronanez "Documentation") | [<img src="https://avatars2.githubusercontent.com/u/12592677?v=4" width="100px;"/><br /><sub><b>Paweł Mikołajczyk</b></sub>](https://github.com/Miklet)<br />[💻](https://github.com/kentcdodds/react-testing-library/commits?author=Miklet "Code") |
358358
| :---: | :---: | :---: | :---: |
359359

360360
<!-- ALL-CONTRIBUTORS-LIST:END -->

package.json

+5-2
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
"version": "0.0.0-semantically-released",
44
"description": "Simple and complete React DOM testing utilities that encourage good testing practices.",
55
"main": "dist/index.js",
6+
"typings": "typings/index.d.ts",
67
"engines": {
78
"node": ">=8",
89
"npm": ">=5"
@@ -18,13 +19,15 @@
1819
"precommit": "kcd-scripts precommit"
1920
},
2021
"files": [
21-
"dist"
22+
"dist",
23+
"typings"
2224
],
2325
"keywords": [],
2426
"author": "Kent C. Dodds <[email protected]> (http://kentcdodds.com/)",
2527
"license": "MIT",
2628
"dependencies": {},
2729
"devDependencies": {
30+
"@types/react-dom": "^16.0.4",
2831
"axios": "^0.18.0",
2932
"history": "^4.7.2",
3033
"kcd-scripts": "^0.36.1",
@@ -58,4 +61,4 @@
5861
"url": "https://github.com/kentcdodds/react-testing-library/issues"
5962
},
6063
"homepage": "https://github.com/kentcdodds/react-testing-library#readme"
61-
}
64+
}

typings/index.d.ts

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
import {Simulate as ReactSimulate} from 'react-dom/test-utils'
2+
3+
interface RenderResult {
4+
container: HTMLDivElement
5+
unmount: VoidFunction
6+
queryByTestId: (id: string) => HTMLElement | null
7+
}
8+
9+
export function render(
10+
ui: React.ReactElement<any>,
11+
options?: {container: HTMLElement},
12+
): RenderResult
13+
14+
export function flushPromises(): Promise<void>
15+
16+
export const Simulate: typeof ReactSimulate

0 commit comments

Comments
 (0)