Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 1970833

Browse files
committed
Merge branch 'beta'
2 parents 81ce711 + 08d5bb4 commit 1970833

30 files changed

+373
-383
lines changed

‎.all-contributorsrc

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -212,6 +212,64 @@
212212
"contributions": [
213213
"code"
214214
]
215+
},
216+
{
217+
"login": "nobrayner",
218+
"name": "Braydon Hall",
219+
"avatar_url": "https://avatars2.githubusercontent.com/u/40751395?v=4",
220+
"profile": "https://github.com/nobrayner",
221+
"contributions": [
222+
"code"
223+
]
224+
},
225+
{
226+
"login": "JacobMGEvans",
227+
"name": "Jacob M-G Evans",
228+
"avatar_url": "https://avatars1.githubusercontent.com/u/27247160?v=4",
229+
"profile": "https://dev.to/jacobmgevans",
230+
"contributions": [
231+
"code",
232+
"test"
233+
]
234+
},
235+
{
236+
"login": "tigerabrodi",
237+
"name": "Tiger Abrodi",
238+
"avatar_url": "https://avatars1.githubusercontent.com/u/49603590?v=4",
239+
"profile": "https://tigerabrodi.dev/",
240+
"contributions": [
241+
"code",
242+
"test"
243+
]
244+
},
245+
{
246+
"login": "merodiro",
247+
"name": "Amr A.Mohammed",
248+
"avatar_url": "https://avatars1.githubusercontent.com/u/17033502?v=4",
249+
"profile": "https://github.com/merodiro",
250+
"contributions": [
251+
"code",
252+
"test"
253+
]
254+
},
255+
{
256+
"login": "juhanakristian",
257+
"name": "Juhana Jauhiainen",
258+
"avatar_url": "https://avatars1.githubusercontent.com/u/544386?v=4",
259+
"profile": "https://github.com/juhanakristian",
260+
"contributions": [
261+
"code"
262+
]
263+
},
264+
{
265+
"login": "jensmeindertsma",
266+
"name": "Jens Meindertsma",
267+
"avatar_url": "https://avatars3.githubusercontent.com/u/64677517?v=4",
268+
"profile": "https://github.com/jensmeindertsma",
269+
"contributions": [
270+
"code",
271+
"test"
272+
]
215273
}
216274
],
217275
"commitConvention": "none"

‎.eslintrc

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,17 @@
11
{
2-
"extends": "./node_modules/kcd-scripts/eslint.js",
2+
"extends": ["./node_modules/kcd-scripts/eslint.js"],
33
"rules": {
44
"max-lines-per-function": "off",
55
"no-constant-condition": "off",
66
"no-await-in-loop": "off",
7+
"no-console": "off",
8+
"import/no-unresolved": "off",
79
"react-hooks/rules-of-hooks": "off",
8-
"no-console": "off"
10+
"@typescript-eslint/no-floating-promises": "off",
11+
"@typescript-eslint/no-unnecessary-condition": "off",
12+
"@typescript-eslint/no-invalid-void-type": "off"
13+
},
14+
"parserOptions": {
15+
"project": ["./tsconfig.json", "./test/tsconfig.json"]
916
}
1017
}

‎CONTRIBUTING.md

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,11 +27,6 @@ select the added contribution type.
2727
Please make sure to run the tests before you commit your changes. You can do so by running
2828
`npm test`.
2929

30-
### Update Typings
31-
32-
The TypeScript type definitions can be found in the
33-
[DefinitelyTyped repo](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/testing-library__react-hooks).
34-
3530
## Help needed
3631

3732
Please check out the

‎README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -192,6 +192,14 @@ Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/d
192192
<td align="center"><a href="https://github.com/joshuaellis"><img src="https://avatars0.githubusercontent.com/u/37798644?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Josh</b></sub></a><br /><a href="https://github.com/testing-library/react-hooks-testing-library/commits?author=joshuaellis" title="Documentation">📖</a></td>
193193
<td align="center"><a href="https://github.com/Goldziher"><img src="https://avatars1.githubusercontent.com/u/30733348?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Na'aman Hirschfeld</b></sub></a><br /><a href="https://github.com/testing-library/react-hooks-testing-library/commits?author=Goldziher" title="Code">💻</a></td>
194194
</tr>
195+
<tr>
196+
<td align="center"><a href="https://github.com/nobrayner"><img src="https://avatars2.githubusercontent.com/u/40751395?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Braydon Hall</b></sub></a><br /><a href="https://github.com/testing-library/react-hooks-testing-library/commits?author=nobrayner" title="Code">💻</a></td>
197+
<td align="center"><a href="https://dev.to/jacobmgevans"><img src="https://avatars1.githubusercontent.com/u/27247160?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Jacob M-G Evans</b></sub></a><br /><a href="https://github.com/testing-library/react-hooks-testing-library/commits?author=JacobMGEvans" title="Code">💻</a> <a href="https://github.com/testing-library/react-hooks-testing-library/commits?author=JacobMGEvans" title="Tests">⚠️</a></td>
198+
<td align="center"><a href="https://tigerabrodi.dev/"><img src="https://avatars1.githubusercontent.com/u/49603590?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Tiger Abrodi</b></sub></a><br /><a href="https://github.com/testing-library/react-hooks-testing-library/commits?author=tigerabrodi" title="Code">💻</a> <a href="https://github.com/testing-library/react-hooks-testing-library/commits?author=tigerabrodi" title="Tests">⚠️</a></td>
199+
<td align="center"><a href="https://github.com/merodiro"><img src="https://avatars1.githubusercontent.com/u/17033502?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Amr A.Mohammed</b></sub></a><br /><a href="https://github.com/testing-library/react-hooks-testing-library/commits?author=merodiro" title="Code">💻</a> <a href="https://github.com/testing-library/react-hooks-testing-library/commits?author=merodiro" title="Tests">⚠️</a></td>
200+
<td align="center"><a href="https://github.com/juhanakristian"><img src="https://avatars1.githubusercontent.com/u/544386?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Juhana Jauhiainen</b></sub></a><br /><a href="https://github.com/testing-library/react-hooks-testing-library/commits?author=juhanakristian" title="Code">💻</a></td>
201+
<td align="center"><a href="https://github.com/jensmeindertsma"><img src="https://avatars3.githubusercontent.com/u/64677517?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Jens Meindertsma</b></sub></a><br /><a href="https://github.com/testing-library/react-hooks-testing-library/commits?author=jensmeindertsma" title="Code">💻</a> <a href="https://github.com/testing-library/react-hooks-testing-library/commits?author=jensmeindertsma" title="Tests">⚠️</a></td>
202+
</tr>
195203
</table>
196204

197205
<!-- markdownlint-restore -->

‎docs/api-reference.md

Lines changed: 0 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -259,28 +259,3 @@ The maximum amount of time in milliseconds (ms) to wait. By default, no timeout
259259
If this option is set to `true`, any errors that occur while waiting are treated as a failed check.
260260
If this option is set to `false`, any errors that occur while waiting cause the promise to be
261261
rejected. By default, errors are not suppressed for this utility.
262-
263-
### `wait`
264-
265-
_(DEPRECATED, use [`waitFor`](/reference/api#waitfor) instead)_
266-
267-
```js
268-
function wait(callback: function(): boolean|void, options?: {
269-
timeout?: number,
270-
suppressErrors?: boolean
271-
}): Promise<void>
272-
```
273-
274-
Returns a `Promise` that resolves if the provided callback executes without exception and returns a
275-
truthy or `undefined` value. It is safe to use the [`result` of `renderHook`](/reference/api#result)
276-
in the callback to perform assertion or to test values.
277-
278-
#### `timeout`
279-
280-
The maximum amount of time in milliseconds (ms) to wait. By default, no timeout is applied.
281-
282-
#### `suppressErrors`
283-
284-
If this option is set to `true`, any errors that occur while waiting are treated as a failed check.
285-
If this option is set to `false`, any errors that occur while waiting cause the promise to be
286-
rejected. By default, errors are suppressed for this utility.

‎jest.config.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
1+
// eslint-disable-next-line
12
const { jest: jestConfig } = require('kcd-scripts/config')
23

34
module.exports = Object.assign(jestConfig, {
45
roots: ['<rootDir>/src', '<rootDir>/test'],
5-
testMatch: ['<rootDir>/test/*.js']
6+
testMatch: ['<rootDir>/test/*.(ts|tsx|js)']
67
})

‎package.json

Lines changed: 10 additions & 4 deletions
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 hooks testing utilities that encourage good testing practices.",
55
"main": "lib/index.js",
6+
"types": "lib/index.d.ts",
67
"keywords": [
78
"testing",
89
"react",
@@ -27,29 +28,34 @@
2728
"validate": "kcd-scripts validate",
2829
"prepare": "npm run build",
2930
"build": "kcd-scripts build --out-dir lib",
31+
"test": "kcd-scripts test",
32+
"typecheck": "kcd-scripts typecheck",
3033
"lint": "kcd-scripts lint",
3134
"format": "kcd-scripts format",
3235
"coverage": "codecov",
33-
"test": "kcd-scripts test",
3436
"docs:dev": "docz dev",
3537
"docs:build": "docz build",
3638
"contributors:add": "all-contributors add"
3739
},
3840
"dependencies": {
3941
"@babel/runtime": "^7.12.5",
40-
"@types/testing-library__react-hooks": "^3.4.0"
42+
"@types/react": ">=16.9.0",
43+
"@types/react-test-renderer": ">=16.9.0"
4144
},
4245
"devDependencies": {
46+
"@typescript-eslint/eslint-plugin": "^4.9.1",
47+
"@typescript-eslint/parser": "^4.9.1",
4348
"all-contributors-cli": "6.19.0",
4449
"codecov": "3.8.1",
4550
"docz": "2.3.1",
4651
"docz-theme-default": "1.2.0",
4752
"docz-utils": "2.3.0",
53+
"eslint": "7.15.0",
4854
"kcd-scripts": "7.5.3",
55+
"prettier": "^2.2.1",
4956
"react": "17.0.1",
5057
"react-test-renderer": "17.0.1",
51-
"typescript": "4.1.3",
52-
"eslint": "7.17.0"
58+
"typescript": "4.1.3"
5359
},
5460
"peerDependencies": {
5561
"react": ">=16.9.0",

‎src/asyncUtils.js

Lines changed: 0 additions & 123 deletions
This file was deleted.

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /