-
Notifications
You must be signed in to change notification settings - Fork 73
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add test + comments and filter invalid flags
- Loading branch information
1 parent
367c6f7
commit 1630e40
Showing
3 changed files
with
27 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import { describe, expect, it } from "vitest" | ||
import { StatsigConfig } from '../../constants/abacus' | ||
import { StatSigFlags } from "../../types/statsig" | ||
import abacusStateManager from "../abacus" | ||
|
||
describe('setStatsigConfigs', () => { | ||
it('only sets properties that exist in the kotlin object', () => { | ||
abacusStateManager.setStatsigConfigs({ | ||
[StatSigFlags.ffEnableEvmSwaps]: true, | ||
'nonexistent_flag': true, | ||
}) | ||
expect(StatsigConfig.ff_enable_evm_swaps).toBe(true) | ||
// @ts-ignore | ||
expect(StatsigConfig.nonexistent_flag).toBeUndefined() | ||
}) | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters