Skip to content

Add warnings for missing await when trying to get a snapshot property value #5383

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Aug 18, 2020

Conversation

Ogurecher
Copy link
Contributor

@Ogurecher Ogurecher commented Jul 31, 2020

Purpose

Add a warning message when trying to get a snapshot property value without calling await (which returns a Promise).

Approach

Saving a callsite when accessing the snapshot property, deleting the callsite in .then (if the property is awaited). If there are callsites left after the test finishes, printing a warning

References

Part of #5087

Pre-Merge TODO

  • Write tests for your proposed changes
  • Make sure that existing tests do not fail

Sorry, something went wrong.

@testcafe-build-bot
Copy link
Collaborator

@testcafe-build-bot
Copy link
Collaborator

@testcafe-build-bot
Copy link
Collaborator

@Ogurecher Ogurecher marked this pull request as ready for review August 3, 2020 12:13
@Ogurecher Ogurecher requested a review from AndreyBelym as a code owner August 3, 2020 12:13
@testcafe-build-bot
Copy link
Collaborator

@AndreyBelym AndreyBelym changed the title [WIP] Add warnings for missing await when trying to get a snapshot property value Add warnings for missing await when trying to get a snapshot property value Aug 17, 2020
@AndreyBelym AndreyBelym requested a review from AlexKamaev August 17, 2020 10:57
@Ogurecher Ogurecher force-pushed the missing-await-warning branch from 39f0bdb to 14b0594 Compare August 17, 2020 11:17
@testcafe-build-bot
Copy link
Collaborator

2 similar comments
@testcafe-build-bot
Copy link
Collaborator

@testcafe-build-bot
Copy link
Collaborator

@testcafe-build-bot
Copy link
Collaborator

@miherlosev miherlosev merged commit cd15d1b into DevExpress:master Aug 18, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants