Hey! Could anyone link me to some example unit tes...
# ask-questions
Hey! Could anyone link me to some example unit tests using jest?
@blue-sundown-32899 has marked the issue as closed. Reopen Issue button
Hi Emily, thanks for reaching out! Are you asking about GrowthBook-specific unit tests? Could you tell me more about what types of things you'd want to test?
I want to test a feature flag I'm setting in growthbook and see if the UI is rendering correctly
@brief-honey-45610 bumping this for an update
Hi Emily, I found we do have examples of using the GB SDK in jest here: https://github.com/growthbook/growthbook/tree/main/packages/sdk-js/test For DOM testing you can probably use JSDOM, or even think about browser-based tests like Playwright.
🙏 1
Hey @clever-beard-86995 was this what you needed? Anything else we can help with?
Hi Emily, I'll go ahead and close this ticket now, but if something else comes up that we can help with please start a new thread in #ask-questions and we'll be happy to take a look!