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
Forcing Switchers to resolve remotely can help you define exclusive features that cannot be resolved locally.
150
150
This feature is ideal if you want to run the SDK in local mode but still want to resolve a specific switcher remotely.
151
-
```ts
151
+
```js
152
152
constswitcher=Client.getSwitcher();
153
153
awaitswitcher.remote().isItOn('FEATURE01');
154
154
```
155
155
156
156
## Built-in mock feature
157
-
You can also bypass your switcher configuration by invoking 'Client.assume'. This is perfect for your test code where you want to test both scenarios when the switcher is true and false.
157
+
You can also bypass your switcher configuration by invoking 'Client.assume'. This is perfect for your test code where you want to validate both scenarios when the switcher is true and false.
158
158
159
159
```js
160
160
Client.assume('FEATURE01').true();
@@ -166,6 +166,12 @@ switcher.isItOn('FEATURE01'); // Now, it's going to return the result retrieved
166
166
Client.assume('FEATURE01').false().withMetadata({ message:'Feature is disabled' }); // Include metadata to emulate Relay response
0 commit comments