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

fix: support setting decodeDatesAsIso globally #159

Merged
merged 9 commits into from
Oct 10, 2023
Merged

Conversation

ffMathy
Copy link
Contributor

@ffMathy ffMathy commented Oct 5, 2023

Resolves #187

@ffMathy ffMathy requested a review from a team as a code owner October 5, 2023 11:45
@jimmycallin
Copy link
Contributor

Oh, we missed adding this in the constructor? Our bad – thanks for the patch!

Please move the option to the call function, and we can merge this.

source/session.ts Outdated Show resolved Hide resolved
source/session.ts Outdated Show resolved Hide resolved
source/session.ts Outdated Show resolved Hide resolved
Copy link
Contributor

@gismya gismya left a comment

Choose a reason for hiding this comment

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

decodeDatesAsIso is defaulted to false in call, so that won't work either. Probably best to default all the different decodeDatesAsIso ( in decode() and call()) to this.decodeDatesAsISO, instead of making other changes inside call().

Also, would be great if you could add tests for this as well, but not strictly necessary.

@ffMathy
Copy link
Contributor Author

ffMathy commented Oct 9, 2023

decodeDatesAsIso is defaulted to false in call, so that won't work either. Probably best to default all the different decodeDatesAsIso ( in decode() and call()) to this.decodeDatesAsISO, instead of making other changes inside call().

I tried doing this now. Let me know if I understood what you meant correctly. If not, I think I need some assistance perhaps?

source/session.ts Outdated Show resolved Hide resolved
Copy link
Contributor

@gismya gismya left a comment

Choose a reason for hiding this comment

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

Added tests, fixed a type error, and prettier formatting.

Thank you @ffMathy!

@gismya gismya merged commit daa9780 into ftrackhq:main Oct 10, 2023
1 of 2 checks passed
@ffMathy
Copy link
Contributor Author

ffMathy commented Oct 10, 2023

Thanks for the assist! ❤️

And sorry for maybe not being too thorough around testing. Things are busy these days, so I must admit I've been trying to limit my investment in this.

@gismya
Copy link
Contributor

gismya commented Oct 10, 2023

No worries at all. Appreciate any contributions.

@ffMathy ffMathy deleted the patch-5 branch October 10, 2023 11:49
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.

bug: dates are wrong type in Jest
3 participants