mirror of
https://github.com/Unleash/unleash.git
synced 2025-01-20 00:08:02 +01:00
Added some unit-test #102
This commit is contained in:
parent
0e8dab784c
commit
1de0d0a737
@ -45,4 +45,21 @@ describe('legacy-feature-mapper', () => {
|
||||
assert(mappedFeature.strategy === undefined);
|
||||
assert(mappedFeature.parameters === undefined);
|
||||
});
|
||||
|
||||
it('should not transform if it already is the new format', () => {
|
||||
const feature = {
|
||||
name: 'test',
|
||||
enabled: 0,
|
||||
strategies: [{
|
||||
name: 'default',
|
||||
parameters: {
|
||||
val: 'bar',
|
||||
},
|
||||
}],
|
||||
};
|
||||
|
||||
const mappedFeature = mapper.toNewFormat(feature);
|
||||
|
||||
assert.equal(mappedFeature, feature);
|
||||
});
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user