Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
it('works with dates', () => {
expect(changedKeys('a', new Date(20))).toEqual(['a']);
expect(changedKeys('a', new Date(20), new Date(10))).toEqual(['a']);
expect(changedKeys('a', new Date(30), new Date(20))).toEqual(['a']);
expect(changedKeys('a', new Date(40), new Date(30))).toEqual(['a']);
});
it('works with primitives', () => {
expect(changedKeys('a', 1, 1)).toEqual([]);
expect(changedKeys('a', null, null)).toEqual([]);
expect(changedKeys('a', true, true)).toEqual([]);
expect(changedKeys('a', 'no', 'no')).toEqual([]);
});
});
it('works with primitives', () => {
expect(changedKeys('a', 1, 2)).toEqual(['a']);
expect(changedKeys('a', null, true)).toEqual(['a']);
expect(changedKeys('a', true, null)).toEqual(['a']);
expect(changedKeys('a', 'no', 'pe')).toEqual(['a']);
});
});
it('works with arrays', () => {
expect(changedKeys('a', [], [])).toEqual([]);
expect(changedKeys('a', [1], [1])).toEqual([]);
expect(changedKeys('a', [1, 2], [1, 2])).toEqual([]);
});
it('works with primitives', () => {
expect(changedKeys('a', 2)).toEqual(['a']);
expect(changedKeys('a', 2, 1)).toEqual(['a']);
expect(changedKeys('a', true, null)).toEqual(['a']);
expect(changedKeys('a', null, true)).toEqual(['a']);
expect(changedKeys('a', 'pe', 'no')).toEqual(['a']);
});
});
it('works with primitives', () => {
expect(changedKeys('a', 2)).toEqual(['a']);
expect(changedKeys('a', 2, 1)).toEqual(['a']);
expect(changedKeys('a', true, null)).toEqual(['a']);
expect(changedKeys('a', null, true)).toEqual(['a']);
expect(changedKeys('a', 'pe', 'no')).toEqual(['a']);
});
});
it('works with primitives', () => {
expect(changedKeys('a', 1, 1)).toEqual([]);
expect(changedKeys('a', null, null)).toEqual([]);
expect(changedKeys('a', true, true)).toEqual([]);
expect(changedKeys('a', 'no', 'no')).toEqual([]);
});
});
it('works with dates', () => {
expect(changedKeys('a', new Date(20))).toEqual(['a']);
expect(changedKeys('a', new Date(20), new Date(10))).toEqual(['a']);
expect(changedKeys('a', new Date(30), new Date(20))).toEqual(['a']);
expect(changedKeys('a', new Date(40), new Date(30))).toEqual(['a']);
});
it('works with primitives', () => {
expect(changedKeys('a', 1, 1)).toEqual([]);
expect(changedKeys('a', null, null)).toEqual([]);
expect(changedKeys('a', true, true)).toEqual([]);
expect(changedKeys('a', 'no', 'no')).toEqual([]);
});
});
it('works with primitives', () => {
expect(changedKeys('a', 1, 1)).toEqual([]);
expect(changedKeys('a', null, null)).toEqual([]);
expect(changedKeys('a', true, true)).toEqual([]);
expect(changedKeys('a', 'no', 'no')).toEqual([]);
});
});