Skip to content
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

Enable strictNullChecks for integration tests #4193

Merged
merged 2 commits into from
Jan 10, 2022

Conversation

tomduncalf
Copy link
Contributor

@tomduncalf tomduncalf commented Jan 6, 2022

What, How & Why?

This change is required for flexible sync. Ideally we'd enable strict: true but this throws a lot more errors so just doing strictNullChecks for now.

I've tried to do runtime assertions where I thought it might make sense (e.g. there's a chance the thing might not exist, if something is badly broken, so throw) and otherwise use non-null assertions, but happy to change if people think we should take a different approach.

☑️ ToDos

  • 📝 Changelog entry
  • 📝 Compatibility label is updated or copied from previous entry
  • 🚦 Tests
  • 📱 Check the React Native/other sample apps work if necessary
  • 📝 Public documentation PR created or is not necessary
  • 💥 Breaking label has been applied or is not necessary

If this PR adds or changes public API's:

  • typescript definitions file is updated
  • jsdoc files updated
  • Chrome debug API is updated if API is available on React Native

@tomduncalf tomduncalf force-pushed the td/enable-strict-mode-integration-tests branch from 4bc48d8 to 43c60ca Compare January 6, 2022 12:21
Copy link
Contributor

@takameyer takameyer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the test should make assertions instead of throwing exceptions. Maybe this warrants a quick discussion.

integration-tests/tests/src/tests/objects.ts Show resolved Hide resolved
@tomduncalf tomduncalf force-pushed the td/enable-strict-mode-integration-tests branch from e050c81 to d7e583e Compare January 6, 2022 15:06
Copy link
Member

@kraenhansen kraenhansen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would love for me or you (probably me) to do a follow-up PR making this strict instead of simply strictNullChecks.

@tomduncalf
Copy link
Contributor Author

If you have the time, that would be awesome, but if not I am happy to look at it once my current bit of work is out of the way (probably end of the week). I'll create an issue to track

@tomduncalf
Copy link
Contributor Author

#4200

@tomduncalf tomduncalf merged commit bc2b2c7 into master Jan 10, 2022
@tomduncalf tomduncalf deleted the td/enable-strict-mode-integration-tests branch January 10, 2022 15:07
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 16, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants