-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #97 from splitio/input_validation_for_getTreatments
[Flag sets] Input validation for getTreatments action creator
- Loading branch information
Showing
19 changed files
with
715 additions
and
331 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
Large diffs are not rendered by default.
Oops, something went wrong.
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
import { | ||
splitReducer as exportedSplitReducer, | ||
initSplitSdk as exportedInitSplitSdk, | ||
getTreatments as exportedGetTreatments, | ||
destroySplitSdk as exportedDestroySplitSdk, | ||
splitSdk as exportedSplitSdk, | ||
track as exportedTrack, | ||
getSplitNames as exportedGetSplitNames, | ||
getSplit as exportedGetSplit, | ||
getSplits as exportedGetSplits, | ||
selectTreatmentValue as exportedSelectTreatmentValue, | ||
selectTreatmentWithConfig as exportedSelectTreatmentWithConfig, | ||
connectSplit as exportedConnectSplit, | ||
connectToggler as exportedConnectToggler, | ||
mapTreatmentToProps as exportedMapTreatmentToProps, | ||
mapIsFeatureOnToProps as exportedMapIsFeatureOnToProps, | ||
/* eslint-disable @typescript-eslint/no-unused-vars */ // Checks that types are exported. Otherwise, the test would fail with a TS error. | ||
ISplitState, | ||
} from '../index'; | ||
|
||
import { splitReducer } from '../reducer'; | ||
import { initSplitSdk, getTreatments, destroySplitSdk, splitSdk } from '../asyncActions'; | ||
import { track, getSplitNames, getSplit, getSplits } from '../helpers'; | ||
import { selectTreatmentValue, selectTreatmentWithConfig } from '../selectors'; | ||
import { connectSplit } from '../react-redux/connectSplit'; | ||
import { connectToggler, mapTreatmentToProps, mapIsFeatureOnToProps } from '../react-redux/connectToggler'; | ||
|
||
it('index should export modules', () => { | ||
|
||
expect(exportedSplitReducer).toBe(splitReducer); | ||
expect(exportedInitSplitSdk).toBe(initSplitSdk); | ||
expect(exportedGetTreatments).toBe(getTreatments); | ||
expect(exportedDestroySplitSdk).toBe(destroySplitSdk); | ||
expect(exportedSplitSdk).toBe(splitSdk); | ||
expect(exportedTrack).toBe(track); | ||
expect(exportedGetSplitNames).toBe(getSplitNames); | ||
expect(exportedGetSplit).toBe(getSplit); | ||
expect(exportedGetSplits).toBe(getSplits); | ||
expect(exportedSelectTreatmentValue).toBe(selectTreatmentValue); | ||
expect(exportedSelectTreatmentWithConfig).toBe(selectTreatmentWithConfig); | ||
expect(exportedConnectSplit).toBe(connectSplit); | ||
expect(exportedConnectToggler).toBe(connectToggler); | ||
expect(exportedMapTreatmentToProps).toBe(mapTreatmentToProps); | ||
expect(exportedMapIsFeatureOnToProps).toBe(mapIsFeatureOnToProps); | ||
|
||
}); |
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
Oops, something went wrong.