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

Add unit tests for clone-client #1880

Merged
merged 2 commits into from
Dec 6, 2022
Merged

Add unit tests for clone-client #1880

merged 2 commits into from
Dec 6, 2022

Conversation

imjoehaines
Copy link
Contributor

Goal

Added some unit tests for clone-client in preparation for some upcoming changes

In practice a lot of this is already covered by other tests that use clone-client, but hopefully these will allow easier debugging if something does break

@@ -50,7 +50,8 @@ export default class ClientWithInternals<T extends Config = Config> extends Clie
_user: User

_metadata: { [key: string]: any }
_features: FeatureFlag | null[]
_features: Array<FeatureFlag | null>
_featuresIndex: { [key: string]: number }
Copy link
Contributor Author

Choose a reason for hiding this comment

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

_featuresIndex needed adding here to get the unit test to compile

Copy link
Contributor

@djskinner djskinner left a comment

Choose a reason for hiding this comment

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

👍

The previous '_features' type definition means 'a FeatureFlag or an
array of nulls', but should be 'an array of FeatureFlags and/or nulls'
@github-actions
Copy link

github-actions bot commented Dec 6, 2022

@bugsnag/browser bundle size diff

Minified Minfied + Gzipped
Before 43.19 kB 13.21 kB
After 43.19 kB 13.21 kB
± No change No change

code coverage diff

<temporarily disabled>

Generated by 🚫 dangerJS against 5e3494a

@imjoehaines imjoehaines merged commit bfda2ce into next Dec 6, 2022
@imjoehaines imjoehaines deleted the clone-client-unit-tests branch December 6, 2022 17:33
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.

2 participants