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 support for mocking launchdarkly-js-client-sdk #13

Open
blimmer opened this issue Oct 25, 2021 · 5 comments
Open

add support for mocking launchdarkly-js-client-sdk #13

blimmer opened this issue Oct 25, 2021 · 5 comments

Comments

@blimmer
Copy link

blimmer commented Oct 25, 2021

right now, this package only works if you're using the react SDK: https://github.com/launchdarkly-labs/jest-launchdarkly-mock/blob/4a9f50510c6057f43a54cb1677f99f1b0fe402bf/src/index.ts#L1

I'm using vue and it would be great to be able to use this helper

@ghost
Copy link

ghost commented Oct 28, 2021

This would be good to see, or have a note on the README stating that this is only for the react SDK

@cameron-hicks
Copy link

Any updates? Still facing this issue.

@yusinto
Copy link
Collaborator

yusinto commented Feb 9, 2022

Thank you for submitting this issue. We are considering supporting both the js sdk and the node sdk with this package but we don't have a timeline right now. I'll keep this issue open and will post an update when there's one.

@darktasevski
Copy link

darktasevski commented Oct 4, 2022

I've written something that can be used to mock LD when using js-sdk. I'm using this approach in my tests, and it seems to work fine.

@yusinto please take a look when you can; maybe you can reuse what I did to speed up the release of the official js-sdk mock for LD. :)

https://gist.github.com/darktasevski/9e441edf17d2f91898d10d2c58d8d5f9

Edit: updated the gist URL, ty for catching the issue @megustalafantabienfria

@a-vizuet
Copy link

a-vizuet commented Nov 1, 2022

I've written something that can be used to mock LD when using js-sdk. I'm using this approach in my tests, and it seems to work fine.

@yusinto please take a look when you can; maybe you can reuse what I did to speed up the release of the official js-sdk mock for LD. :)

https://gist.github.com/d-tasevski/9e441edf17d2f91898d10d2c58d8d5f9

I get a 404 when I try to open your gist :( can you share it again? pls

EDIT: Thanks! It worked for what I was trying to test :)

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

No branches or pull requests

5 participants