1
0
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:
Ivar 2016-07-02 17:05:14 +02:00 committed by Ivar Conradi Østhus
parent 0e8dab784c
commit 1de0d0a737

View File

@ -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);
});
});