Skip to content

Tags: luismendes070/react-hooks-testing-library

Tags

v4.0.0-beta.1

Toggle v4.0.0-beta.1's commit message

Partially verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
We cannot verify signatures from co-authors, and some of the co-authors attributed to this commit require their commits to be signed.
feat: Convert to TypeScript (testing-library#520)

* Added tsconfig.json. Modified eslint config

* Convert src/cleanup.js to TypeScript

* Change src/cleanup.ts to use inline types

* revert eslintrc

* disable eslint for cleanup import

this can be reverted when `pure.js` is converted to typescript

* convert index to typescript

just a rename 😅

* BREAKING CHANGE: Worked on typing asyncUtils. Removed deprecated wait. Disabled import/no-unresolved for now

* Fix incorrect cleanup callback type

* asyncUtils has been updated. Two lines are disabled for eslint.

* remove unnecessary eslint disable

* Prettier was stripping try catch types
- see: https://prettier.io/blog/2020/08/24/2.1.0.html\#type-annotations-on-catch-clauses-8805httpsgithubcomprettierprettierpull8805-by-fiskerhttpsgithubcomfisker
- Updated prettier in local devDeps to resolve directly to newest supported version

* Type for callback handle generic input & undefined handled by nullish operator
TS expecting explicit return of undefined from arrow function with type
Expected to return a value at the end of arrow function.eslintconsistent-return
resolved by passing return in catch with undefined, same behavior more explicit

* comments for review

* VoidFunction in place for void until decided behavior for waitFor()

* Utilizing OR operator with generic Types allows for desired behavior and previous tests pass

* mistakenly left out linter ignores in last commit

* Minimum types started for Pure file
- File needs better, improved typing and Refactoring for Linter Disables to be removed IF POSSIBLE

* removed comments -- answered in PR
- Types and OR check should handle expected behavior

* Generic HTML types for initialProps

* Generic HTML types for initialProps

* Generic type for callback and initialProps

* Generics added and CB toplevel same generic pattern added

* force rebuild with unbound method eslint ignore

* parser issue -- attempt to fix by removing specific TS eslint rule

* Newer versions of ESLint might resolve the parser issue

* Added configs to get started on test conversion

* Generic type for resultContainer

this should allow typescript to infer the type of result.current
further improvments needed to add type guards

* convert tests that require no changes

renamed tests that didn't require code changes to the tests

* add types to cleanup test

* Test TS Overhaul
- Amr, Tiger and myself worked on these commits
- Other Raid members in chat assisted
- All tests are strongly typed with minimal types
to allow for working and made sure tests types were easily usable
with types in Pure and Utils file, allow for good UX & DX

* Amr updated types useEffect

* Jens suggestion for more generic number key type

* Remove wait reference from docs

* Add nobrayner to contributors

* Add JacobMGEvans to contributors

* Update src/pure.tsx

* Add tigerabrodi to contributors

* Add Amr, Juhana, and Jens to contributors

* update suspenseHook, cache type and the type of the error in catch.

* cleanup.ts, update the way addCleanup adds another callback to cleanupCallbacks.

* Made generics more descriptive, made TestHook generic

* Remove some eslint disables that didn't do anything

* Remove DefinitelyTyped reference in CONTRIBUTING.md

* chore: disable declaration for tests

* Removes createTimeoutError. Adds constructor to TimeoutError. Adds typeing to waitForValueToChange options

* Remove conditional in TestHook for hookProps

* Replace old types defs with referenced types in dependencies

* Remove destructuring of `testRenderer`

* Disabled floating promise lint rule globally

* Refactor TestHook catch to not disable lint rules

* Disabled eslint error for while(true)

* Cleaned up some line warnings from tests

* Added "typecheck" kcd-script to improve "validate" script

* Clean up ThrowError type in errorHook tests

* Replace VoidFunction with () => void

* Replace CallableFunction with a more explicit function type

Co-authored-by: Braydon Hall <[email protected]>
Co-authored-by: Amr Gad <[email protected]>
Co-authored-by: tigerabrodi <[email protected]>
Co-authored-by: Jacob Evans <[email protected]>
Co-authored-by: Jacob M-G Evans <[email protected]>
Co-authored-by: marcosvega91 <[email protected]>
Co-authored-by: Michael Peyper <[email protected]>

v3.7.0

Toggle v3.7.0's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
feat(cleanup): remove unnecessary flush microtasks as already handled…

… by act (testing-library#511)

v3.6.0

Toggle v3.6.0's commit message
feat(release): manually release a minor version

There was an issue with a minor release, so this manual-releases.md
change is to release a new minor version.

Reference: testing-library#496

v3.5.0

Toggle v3.5.0's commit message
chore: include release stage of build on master branch

v3.4.2

Toggle v3.4.2's commit message
3.4.2

v3.4.1

Toggle v3.4.1's commit message
3.4.1

v3.4.0

Toggle v3.4.0's commit message
3.4.0

v3.3.0

Toggle v3.3.0's commit message
3.3.0

v3.2.1

Toggle v3.2.1's commit message
3.2.1

v3.2.0

Toggle v3.2.0's commit message
3.2.0