Skip to content

Commit

Permalink
Added some unit-test #102
Browse files Browse the repository at this point in the history
  • Loading branch information
ivarconr committed Sep 6, 2016
1 parent a1abc10 commit 493e1d6
Showing 1 changed file with 17 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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);
});
});

0 comments on commit 493e1d6

Please sign in to comment.