Skip to content

Commit

Permalink
Code review
Browse files Browse the repository at this point in the history
  • Loading branch information
Vinicius de Lacerda committed Jun 6, 2024
1 parent 9b32a6a commit 5e2c595
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,8 @@ See the [Optimizely integration documentation](docs/optimizely-integration.md).

## Toggles

Toggles can be used to implement a/b/c style testing and on/off values as well.
We specify multiple variants of which one is active at any time.
Toggles can be used to implement a/b/c style MVT testing and on/off feature flags as well.
We specify multiple variants of which only one is active at any time.
By convention the variants are named `a` (control), `b`, `c` etc.

### Reading values
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,11 @@ export const createInstanceMock = jest.fn(() => ({
}))

export const decideMock = jest.fn((toggleKey) => ({
enabled: toggleKey === "foo"
enabled: toggleKey === 'foo'
}))
export const optimizelyUserContextMock = jest.fn(() => ({
decide: decideMock
}))


export const isFeatureEnabledMock = jest.fn((toggleId) => toggleId === 'foo')

Expand All @@ -38,5 +37,4 @@ const mock = {
createInstance: createInstanceMock
}


export default mock

0 comments on commit 5e2c595

Please sign in to comment.