mirror of
https://github.com/Unleash/unleash.git
synced 2025-01-25 00:07:47 +01:00
35262e404b
* refactor: fix splash page button background color * refactor: regenerate OpenAPI client * refactor: clean up strategy parameter types * refactor: remove index signature from IConstraint * refactor: fix never-seen status in features list
32 lines
655 B
TypeScript
32 lines
655 B
TypeScript
import { cleanConstraint } from 'utils/cleanConstraint';
|
|
|
|
test('cleanConstraint values', () => {
|
|
expect(
|
|
cleanConstraint({
|
|
contextName: '',
|
|
operator: 'IN',
|
|
value: '1',
|
|
values: ['2'],
|
|
})
|
|
).toEqual({
|
|
contextName: '',
|
|
operator: 'IN',
|
|
values: ['2'],
|
|
});
|
|
});
|
|
|
|
test('cleanConstraint value', () => {
|
|
expect(
|
|
cleanConstraint({
|
|
contextName: '',
|
|
operator: 'NUM_EQ',
|
|
value: '1',
|
|
values: ['2'],
|
|
})
|
|
).toEqual({
|
|
contextName: '',
|
|
operator: 'NUM_EQ',
|
|
value: '1',
|
|
});
|
|
});
|