Commit Graph

1136 Commits

Author SHA1 Message Date
Michał Pierzchała 111b1c9277 fix: modern jest timers (#397)
* fix: modern jest timers

* treat modern timers as default, but be explicit in tests

* we're node-only

* rename to Thenable

* add clarifications; unify test names

* Update src/__tests__/auto-cleanup-skip.test.js

Co-authored-by: Maciej Jastrzebski <mdjastrzebski@gmail.com>

Co-authored-by: Maciej Jastrzebski <mdjastrzebski@gmail.com>
2020-07-10 16:18:31 +02:00
Przemysław Bitkowski 859cb82b87 Replace imports (#421) 2020-07-04 08:50:22 +02:00
Michał Pierzchała 97cd12d983 chore: bump logkitty to avoid security warnings (#420) 2020-07-03 10:45:10 +02:00
dependabot-preview[bot] fc69e0de1b chore(deps-dev): bump babel-jest from 26.0.1 to 26.1.0 (#404)
Bumps [babel-jest](https://github.com/facebook/jest/tree/HEAD/packages/babel-jest) from 26.0.1 to 26.1.0.
- [Release notes](https://github.com/facebook/jest/releases)
- [Changelog](https://github.com/facebook/jest/blob/master/CHANGELOG.md)
- [Commits](https://github.com/facebook/jest/commits/v26.1.0/packages/babel-jest)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2020-07-03 10:27:39 +02:00
dependabot-preview[bot] 8066ac2ec7 chore(deps-dev): bump @types/react from 16.9.36 to 16.9.41 (#405)
Bumps [@types/react](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/react) from 16.9.36 to 16.9.41.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/react)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2020-07-03 10:16:25 +02:00
dependabot-preview[bot] 036f731a1c chore(deps-dev): bump eslint from 7.2.0 to 7.3.1 (#400)
Bumps [eslint](https://github.com/eslint/eslint) from 7.2.0 to 7.3.1.
- [Release notes](https://github.com/eslint/eslint/releases)
- [Changelog](https://github.com/eslint/eslint/blob/master/CHANGELOG.md)
- [Commits](https://github.com/eslint/eslint/compare/v7.2.0...v7.3.1)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2020-07-03 10:16:01 +02:00
dependabot-preview[bot] 76c45d45e3 chore(deps): bump pretty-format from 26.0.1 to 26.1.0 (#402)
Bumps [pretty-format](https://github.com/facebook/jest/tree/HEAD/packages/pretty-format) from 26.0.1 to 26.1.0.
- [Release notes](https://github.com/facebook/jest/releases)
- [Changelog](https://github.com/facebook/jest/blob/master/CHANGELOG.md)
- [Commits](https://github.com/facebook/jest/commits/v26.1.0/packages/pretty-format)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2020-07-03 10:15:49 +02:00
dependabot-preview[bot] d653c59558 chore(deps-dev): bump jest from 26.0.1 to 26.1.0 (#403)
Bumps [jest](https://github.com/facebook/jest) from 26.0.1 to 26.1.0.
- [Release notes](https://github.com/facebook/jest/releases)
- [Changelog](https://github.com/facebook/jest/blob/master/CHANGELOG.md)
- [Commits](https://github.com/facebook/jest/compare/v26.0.1...v26.1.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2020-07-03 10:15:34 +02:00
dependabot-preview[bot] 2ec84730f7 chore(deps-dev): bump @types/react-native from 0.62.13 to 0.62.16 (#417)
Bumps [@types/react-native](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/react-native) from 0.62.13 to 0.62.16.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/react-native)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2020-07-03 10:07:49 +02:00
Paul Cowgill 2bf4fcf943 docs: fix a link to react-testing-library (#412) 2020-06-30 17:18:43 +02:00
Nathan Loudjani dc854a9717 docs: Fix typo in migration doc (#411) 2020-06-30 16:54:17 +02:00
Michał Pierzchała 362d3727bf chore: bump Jest typings (#396) 2020-06-22 10:55:04 +02:00
dependabot-preview[bot] 401d3d3dac chore(deps-dev): bump release-it from 13.6.2 to 13.6.3 (#385)
Bumps [release-it](https://github.com/release-it/release-it) from 13.6.2 to 13.6.3.
- [Release notes](https://github.com/release-it/release-it/releases)
- [Changelog](https://github.com/release-it/release-it/blob/master/CHANGELOG.md)
- [Commits](https://github.com/release-it/release-it/compare/13.6.2...13.6.3)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2020-06-16 15:41:55 +02:00
dependabot-preview[bot] 5d003a3a47 chore(deps-dev): bump @types/react from 16.9.35 to 16.9.36 (#381)
Bumps [@types/react](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/react) from 16.9.35 to 16.9.36.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/react)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2020-06-16 15:41:44 +02:00
Martin Cerny 8a57c68f42 docs: fix link to GitHub from footer (#382) 2020-06-12 11:53:05 +02:00
dependabot-preview[bot] 6028b9ceb4 chore(deps-dev): bump eslint from 7.1.0 to 7.2.0 (#378)
Bumps [eslint](https://github.com/eslint/eslint) from 7.1.0 to 7.2.0.
- [Release notes](https://github.com/eslint/eslint/releases)
- [Changelog](https://github.com/eslint/eslint/blob/master/CHANGELOG.md)
- [Commits](https://github.com/eslint/eslint/compare/v7.1.0...v7.2.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2020-06-10 08:32:14 +02:00
dependabot-preview[bot] 6d38852a82 chore(deps-dev): bump @types/react-native from 0.62.12 to 0.62.13 (#373)
Bumps [@types/react-native](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/react-native) from 0.62.12 to 0.62.13.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/react-native)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2020-06-10 08:32:04 +02:00
dependabot-preview[bot] dfb266afc4 chore(deps-dev): bump typescript from 3.9.2 to 3.9.5 (#374)
Bumps [typescript](https://github.com/Microsoft/TypeScript) from 3.9.2 to 3.9.5.
- [Release notes](https://github.com/Microsoft/TypeScript/releases)
- [Commits](https://github.com/Microsoft/TypeScript/compare/v3.9.2...v3.9.5)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2020-06-10 08:31:48 +02:00
Michał Pierzchała edc6712a5a v2.1.0 v2.1.0 2020-06-10 08:24:39 +02:00
Maciej Jastrzebski 300d16b822 feature: wait for element to be removed (#376)
* feature: basic implementation

* feature: basic implementation

* feature: added typescript types

* feature: check if element exists initially

* resolve promise with initial elements

* docs: README & API

* use ErrorWithStack helper

Co-authored-by: Michał Pierzchała <thymikee@gmail.com>
2020-06-10 08:17:01 +02:00
dependabot[bot] dab54a9d42 chore(deps): bump websocket-extensions from 0.1.3 to 0.1.4 in /website (#377)
Bumps [websocket-extensions](https://github.com/faye/websocket-extensions-node) from 0.1.3 to 0.1.4.
- [Release notes](https://github.com/faye/websocket-extensions-node/releases)
- [Changelog](https://github.com/faye/websocket-extensions-node/blob/master/CHANGELOG.md)
- [Commits](https://github.com/faye/websocket-extensions-node/compare/0.1.3...0.1.4)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-06-07 09:06:00 +02:00
Michał Pierzchała fa50f7f767 v2.0.1 v2.0.1 2020-06-03 16:03:09 +02:00
dependabot-preview[bot] 50339225fb chore(deps-dev): bump @babel/core from 7.9.6 to 7.10.2 (#365)
Bumps [@babel/core](https://github.com/babel/babel/tree/HEAD/packages/babel-core) from 7.9.6 to 7.10.2.
- [Release notes](https://github.com/babel/babel/releases)
- [Changelog](https://github.com/babel/babel/blob/master/CHANGELOG.md)
- [Commits](https://github.com/babel/babel/commits/v7.10.2/packages/babel-core)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2020-06-03 15:58:39 +02:00
dependabot-preview[bot] 8526fa4f1f chore(deps-dev): bump @babel/cli from 7.8.4 to 7.10.1 (#354)
Bumps [@babel/cli](https://github.com/babel/babel/tree/HEAD/packages/babel-cli) from 7.8.4 to 7.10.1.
- [Release notes](https://github.com/babel/babel/releases)
- [Changelog](https://github.com/babel/babel/blob/master/CHANGELOG.md)
- [Commits](https://github.com/babel/babel/commits/v7.10.1/packages/babel-cli)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2020-06-03 15:54:52 +02:00
dependabot-preview[bot] 1d0e1a2433 chore(deps-dev): bump @babel/preset-flow from 7.9.0 to 7.10.1 (#357)
Bumps [@babel/preset-flow](https://github.com/babel/babel/tree/HEAD/packages/babel-preset-flow) from 7.9.0 to 7.10.1.
- [Release notes](https://github.com/babel/babel/releases)
- [Changelog](https://github.com/babel/babel/blob/master/CHANGELOG.md)
- [Commits](https://github.com/babel/babel/commits/v7.10.1/packages/babel-preset-flow)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2020-06-03 15:54:29 +02:00
dependabot-preview[bot] 2320e1ce23 chore(deps-dev): bump eslint from 7.0.0 to 7.1.0 (#347)
Bumps [eslint](https://github.com/eslint/eslint) from 7.0.0 to 7.1.0.
- [Release notes](https://github.com/eslint/eslint/releases)
- [Changelog](https://github.com/eslint/eslint/blob/master/CHANGELOG.md)
- [Commits](https://github.com/eslint/eslint/compare/v7.0.0...v7.1.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2020-06-03 15:40:35 +02:00
dependabot-preview[bot] f30a3b9713 chore(deps-dev): bump @types/react-native from 0.62.10 to 0.62.12 (#353)
Bumps [@types/react-native](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/react-native) from 0.62.10 to 0.62.12.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/react-native)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2020-06-03 15:40:16 +02:00
dependabot-preview[bot] ac6cb62b1e chore(deps-dev): bump @babel/preset-env from 7.9.6 to 7.10.2 (#366)
Bumps [@babel/preset-env](https://github.com/babel/babel/tree/HEAD/packages/babel-preset-env) from 7.9.6 to 7.10.2.
- [Release notes](https://github.com/babel/babel/releases)
- [Changelog](https://github.com/babel/babel/blob/master/CHANGELOG.md)
- [Commits](https://github.com/babel/babel/commits/v7.10.2/packages/babel-preset-env)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2020-06-03 15:39:45 +02:00
dependabot-preview[bot] 568d9710e7 chore(deps-dev): bump release-it from 13.6.1 to 13.6.2 (#370)
Bumps [release-it](https://github.com/release-it/release-it) from 13.6.1 to 13.6.2.
- [Release notes](https://github.com/release-it/release-it/releases)
- [Changelog](https://github.com/release-it/release-it/blob/master/CHANGELOG.md)
- [Commits](https://github.com/release-it/release-it/compare/13.6.1...13.6.2)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2020-06-03 15:39:31 +02:00
Michał Pierzchała 7dc3ba3259 chore: use files entry instead of npmignore; reduce publish size (#371) 2020-06-03 15:38:55 +02:00
Vojtech Novak 3de2a2b35f clarify UNSAFE_ functions are not scheduled for removal (#368) 2020-06-01 18:04:31 +02:00
Drew Miller 7c6df013ff docs: update React Navigation tests to use find queries (#364)
* docs: update React Navigation tests to use find queries

* update test to be in sync with documentation
2020-05-31 11:58:31 +02:00
Sanjeev yadav 9245d9efea chore: Update github issue template file (#363) 2020-05-31 11:34:14 +02:00
Michał Pierzchała 2e4594f868 docs: clarify configuration to incluude preset react-native (#362) 2020-05-30 20:18:35 +02:00
dependabot-preview[bot] 16677ad131 chore(deps-dev): bump @babel/preset-react from 7.9.4 to 7.10.1 (#355)
Bumps [@babel/preset-react](https://github.com/babel/babel/tree/HEAD/packages/babel-preset-react) from 7.9.4 to 7.10.1.
- [Release notes](https://github.com/babel/babel/releases)
- [Changelog](https://github.com/babel/babel/blob/master/CHANGELOG.md)
- [Commits](https://github.com/babel/babel/commits/v7.10.1/packages/babel-preset-react)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2020-05-29 10:21:47 +02:00
Michał Pierzchała 8e43ed5646 v2.0.0 v2.0.0 2020-05-28 15:09:14 +02:00
Michał Pierzchała 16790a528e v2.0.0-rc.1 2020-05-28 15:06:04 +02:00
Maciej Jastrzebski 2b14360f28 feat: wrap waitFor in (async) act to support async queries without explicit act call (#344)
* Wrapped waitFor call in act to support async waitFor/findBy

* Updated docs

* Spelling mistake

* Added short info in migration guide

* Corrected spelling

* Clarified comments

* Added async act implementation conditional on React version

* Code review changes

* Update src/waitFor.js

Co-authored-by: Michał Pierzchała <thymikee@gmail.com>

* Update src/waitFor.js

Co-authored-by: Michał Pierzchała <thymikee@gmail.com>

* Fixed prettier

* Update src/waitFor.js

Co-authored-by: Michał Pierzchała <thymikee@gmail.com>

Co-authored-by: Michał Pierzchała <thymikee@gmail.com>
2020-05-28 15:06:04 +02:00
Michał Pierzchała cffd31802f v2.0.0-rc.0 2020-05-28 15:06:04 +02:00
Michał Pierzchała c86484dee4 docs: cleanup migration doc (#342) 2020-05-28 15:06:04 +02:00
Maciej Jastrzebski a47116be1c chore: rename Migration20.md to MigrationV2.md (#341) 2020-05-28 15:06:04 +02:00
Maciej Jastrzebski 9e50bff6ab chore(breaking): deprecate flushMicrotasksQueue (#340)
* Deprecated flushMicrotasksQueue

* Update website/docs/Migration20.md

Co-authored-by: Michał Pierzchała <thymikee@gmail.com>

* Renamed flushMicrotasksQueueInternal to flushMicroTasks

Co-authored-by: Michał Pierzchała <thymikee@gmail.com>
2020-05-28 15:06:04 +02:00
Maciej Jastrzebski 7c0ee5683f Spelling mistake 2020-05-28 15:06:04 +02:00
Alec Larson ad66a5489d feat: call "cleanup" automatically (#238)
* feat: add "cleanup" function

* docs: add "cleanup" section

* feat: automatically call "cleanup" after each test

...if an "afterEach" global function is defined, and process.env.RTL_SKIP_AUTO_CLEANUP is falsy.

Taken from: https://github.com/testing-library/react-testing-library/blob/14670debd45236d2c5d0a61a83dadc72af1bef7c/src/index.js

* docs: mention automatic cleanup

* add within

* fix lint

* Updated tests, added auto-cleanup test

* Added ways to prevent auto cleanup

* Small fix

* Code review changes

* Update website/docs/API.md

Co-authored-by: Michał Pierzchała <thymikee@gmail.com>

* More changes

* Removed  afterEach(cleanup) calls in examples

* Code cleanup

Co-authored-by: Michał Pierzchała <thymikee@gmail.com>
Co-authored-by: Maciej Jastrzebski <mdjastrzebski@gmail.com>
2020-05-28 15:06:04 +02:00
Maciej Jastrzebski 40ed26812d chore: reorganize TS test file (#337) 2020-05-28 15:06:04 +02:00
Maciej Jastrzebski 01bc0ee2b4 feat: update docs bases on cancelled prepare-2 PR (#335)
* Adapt docs changes from `prepare-2` branch

* WIP

* Removed unused `printUnsafeWarning` function

# Conflicts:
#	src/helpers/errors.js

* Code review changes
2020-05-28 15:06:04 +02:00
Maciej Jastrzebski 9fc83fec60 Feat(breaking): remove deprecated functions (#334)
* WIP

* More changes

* WIP

* Added throwRemovedFunctionError docsRef

* Fixed tests

* Typescript types cleanup

* Cleanup

* Moving some changes from `prepare-2` branch

* Moving some changes from `prepare-2` branch

* Update src/waitFor.js

Co-authored-by: Michał Pierzchała <thymikee@gmail.com>

* Update website/docs/Migration20.md

Co-authored-by: Michał Pierzchała <thymikee@gmail.com>

* Code review changes

* More code review changes

* Code review changes

* More code review changes

* Added @deprecated messages for TS type defs

* Spelling mistake

* Reformatted index.d.ts

* Removed remaining refs to warnFn

Co-authored-by: Michał Pierzchała <thymikee@gmail.com>
2020-05-28 15:06:04 +02:00
Michał Pierzchała 163cc8533a chore(breaking): compile project to Node 10 using @babel/preset-env (#309)
* chore: compile project to Node 8.3 using @babel/preset-env

* update snapshots

* compile to Node 10

* adjust snapshots back

* add migration docs
2020-05-28 15:06:04 +02:00
Maciej Jastrzebski 5e798bc2e3 Feat(breaking): unify wait for element signature with testing library (#327)
* Change argument to options object

* Renamed `waitForElement` to `waitFor`

* Migration guide entry

* Fixed typescript check

* Update src/helpers/a11yAPI.js

Co-authored-by: Michał Pierzchała <thymikee@gmail.com>

* (Nearly) Empty migration doc for ver. 2.0 (#326)

* Added migration docs section

* Added to docosaurus side bar

* Updated README

* Increased async test timeout

* Update website/docs/Migration20.md

Co-authored-by: Michał Pierzchała <thymikee@gmail.com>

* feat(breaking): remove legacy `debug` export (#328)

* Removed global `debug` functions

* Removed global `debug` from docs

* Cleanup

* Added migration section

Co-authored-by: Michał Pierzchała <thymikee@gmail.com>

Co-authored-by: Michał Pierzchała <thymikee@gmail.com>
2020-05-28 15:06:04 +02:00
Maciej Jastrzebski 043f51d36c feat(breaking): remove legacy debug export (#328)
* Removed global `debug` functions

* Removed global `debug` from docs

* Cleanup

* Added migration section

Co-authored-by: Michał Pierzchała <thymikee@gmail.com>
2020-05-28 15:06:04 +02:00