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
Create file src/mappers/isValue.ts with function matches to type (...acceptedValues:string[]) => ValueMapper<boolean>. Which check value to be included in accepted values. Returns false if no accepted values provided.
reexport it in src/mappers/index.ts
Prove that it works in unit test
Describe it in Readme.md
proposed test data provider:
constdataProvider=[// without accepted values{inValue: '',inAcceptedValue:[],expectedResult: false},{inValue: 'TRUE',inAcceptedValue:[],expectedResult: false},{inValue: 'X',inAcceptedValue:[],expectedResult: false},{inValue: '1',inAcceptedValue:[],expectedResult: false},{inValue: 'FALSE',inAcceptedValue:[],expectedResult: false},{inValue: 'Lorem',inAcceptedValue:[],expectedResult: false},// with one accepted value{inValue: '',inAcceptedValue:['X'],expectedResult: false},{inValue: 'TRUE',inAcceptedValue:['X'],expectedResult: false},{inValue: 'X',inAcceptedValue:['X'],expectedResult: true},{inValue: '1',inAcceptedValue:['X'],expectedResult: false},{inValue: 'FALSE',inAcceptedValue:['X'],expectedResult: false},{inValue: 'Lorem',inAcceptedValue:['X'],expectedResult: false},// with more than one accepted value{inValue: '',inAcceptedValue:['X','TRUE','1'],expectedResult: false},{inValue: 'TRUE',inAcceptedValue:['X','TRUE','1'],expectedResult: true},{inValue: 'X',inAcceptedValue:['X','TRUE','1'],expectedResult: true},{inValue: '1',inAcceptedValue:['X','TRUE','1'],expectedResult: true},{inValue: 'FALSE',inAcceptedValue:['X','TRUE','1'],expectedResult: false},{inValue: 'Lorem',inAcceptedValue:['X','TRUE','1'],expectedResult: false},// with different case{inValue: 'TRUE',inAcceptedValue:['true'],expectedResult: true},{inValue: 'X',inAcceptedValue:['x'],expectedResult: true},];
For making a reservation please open draft PR with this issue linked
The text was updated successfully, but these errors were encountered:
Part of #21
TODO:
src/mappers/isValue.ts
with function matches to type(...acceptedValues:string[]) => ValueMapper<boolean>
. Which check value to be included in accepted values. Returns false if no accepted values provided.src/mappers/index.ts
proposed test data provider:
For making a reservation please open draft PR with this issue linked
The text was updated successfully, but these errors were encountered: