You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Sep 1, 2022. It is now read-only.
Make it easier to test experiments during automated testing. Example below uses Jest, but these new helper methods and qa flag should be applicable to any testing library.
describe('my app',()=>{beforeAll(()=>{// Flag to turn on QA mode// Force variation -1 for all experiments unless explicitly forced to something else// Disable auto experimentsclient.config.qa=true;})beforeEach(()=>{// Undo any forces applied within test casesclient.forcedVariations.clear();})it("works for control",()=>{// test the control behavior})it("works for variation",()=>{// force a non-control variationclient.forceVariations.set("my-test",1);// test the variation 1 behavior})})
The text was updated successfully, but these errors were encountered:
Make it easier to test experiments during automated testing. Example below uses Jest, but these new helper methods and
qa
flag should be applicable to any testing library.The text was updated successfully, but these errors were encountered: