-
Notifications
You must be signed in to change notification settings - Fork 676
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
Add warnings for missing await when trying to get a snapshot property value #5383
Conversation
❌ Tests for the commit 601297d have failed. See details: |
❌ Tests for the commit 601297d have failed. See details: |
✅ Tests for the commit 601297d have passed. See details: |
❌ Tests for the commit 39f0bdb have failed. See details: |
39f0bdb
to
14b0594
Compare
❌ Tests for the commit 14b0594 have failed. See details: |
2 similar comments
❌ Tests for the commit 14b0594 have failed. See details: |
❌ Tests for the commit 14b0594 have failed. See details: |
✅ Tests for the commit 14b0594 have passed. See details: |
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 warningReferences
Part of #5087
Pre-Merge TODO