Files
klz-cables.com/.pnpm-store/v10/files/11/bb3335567b37fa8335c3df8ad260744e68e5a5c1b97b23762c6cfbe6397d4038947dfac91b8d16056b98ed3fb63d508fc90975f3882cc9e20a52026c723a67
Marc Mintel 5397309103
Some checks failed
Build & Deploy / 🔍 Prepare (push) Successful in 20s
Build & Deploy / 🧪 QA (push) Failing after 34s
Build & Deploy / 🏗️ Build (push) Has started running
Build & Deploy / 🚀 Deploy (push) Has been cancelled
Build & Deploy / 🧪 Smoke Test (push) Has been cancelled
Build & Deploy / ⚡ Lighthouse (push) Has been cancelled
Build & Deploy / 🔔 Notify (push) Has been cancelled
fix(products): fix breadcrumbs and product filtering (backport from main)
2026-02-24 16:04:21 +01:00

47 lines
1.2 KiB
Plaintext

import { describe, it, expect } from 'vitest';
import { fieldHasChanges } from './fieldHasChanges.js';
describe('hasChanges', () => {
it('should return false for identical values', () => {
const a = 'value';
const b = 'value';
expect(fieldHasChanges(a, b)).toBe(false);
});
it('should return true for different values', () => {
const a = 1;
const b = 2;
expect(fieldHasChanges(a, b)).toBe(true);
});
it('should return false for identical objects', () => {
const a = {
key: 'value'
};
const b = {
key: 'value'
};
expect(fieldHasChanges(a, b)).toBe(false);
});
it('should return true for different objects', () => {
const a = {
key: 'value'
};
const b = {
key: 'differentValue'
};
expect(fieldHasChanges(a, b)).toBe(true);
});
it('should handle undefined values', () => {
const a = {
key: 'value'
};
const b = undefined;
expect(fieldHasChanges(a, b)).toBe(true);
});
it('should handle null values', () => {
const a = {
key: 'value'
};
const b = null;
expect(fieldHasChanges(a, b)).toBe(true);
});
});
//# sourceMappingURL=fieldHasChanges.spec.js.map