Files
grafana/public/app/features/alerting/unified/components/rules/ReorderRuleGroupModal.test.tsx
Gilles De Mey fb93b60fcc Alerting: Support for re-ordering alert rules in a group (#53318)
Co-authored-by: Peter Holmberg <peterholmberg@users.noreply.github.com>
2022-08-16 14:42:02 +02:00

12 lines
341 B
TypeScript

import { reorder } from './ReorderRuleGroupModal';
describe('test reorder', () => {
it('should reorder arrays', () => {
const original = [1, 2, 3];
const expected = [1, 3, 2];
expect(reorder(original, 1, 2)).toEqual(expected);
expect(original).not.toEqual(expected); // make sure we've not mutated the original
});
});