-
Notifications
You must be signed in to change notification settings - Fork 129
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
chore: Run ts on test files #1358
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
Hey @robbie-c! 👋 |
Size Change: +232 B (+0.02%) Total Size: 1.17 MB
ℹ️ View Unchanged
|
c9045ea
to
6325059
Compare
baf6c17
to
0b88932
Compare
3fce416
to
172bade
Compare
@@ -614,11 +615,12 @@ describe('surveys', () => { | |||
}) | |||
|
|||
it('returns event based surveys that observed an event', () => { | |||
// TODO this test fails when run in isolation |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Phanatic Can you take a look at this? (separate to this PR)
5b4d8da
to
a21aa40
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this is totally worth it
a21aa40
to
f030c70
Compare
Changes
We're not running typescript type-checking on our test files.
In the past I've found this is pretty mixed but overall positive, on the one hand you make refactoring easier and end up catching problems you might not have caught, but on the other hand your test files end up with more type coercion which is quite noisy.
Here's my attempt at adding it to posthog-js. I created a new tsconfig.json for the test files which is less strict. If I add strict:true to the test tsconfig, there's another 309 errors left to fix - let's define this at out of scope, it's still a huge improvement in type safety without it
Checklist