mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-01-31 15:27:50 +00:00
21 lines
502 B
JavaScript
21 lines
502 B
JavaScript
import conforms from '../src/conforms';
|
|
|
|
describe('conforms', () => {
|
|
it('should not change behavior if `source` is modified', () => {
|
|
const object = { a: 2 };
|
|
const source = {
|
|
a: function (value) {
|
|
return value > 1;
|
|
},
|
|
};
|
|
const par = conforms(source);
|
|
|
|
expect(par(object)).toBe(true);
|
|
|
|
source.a = function (value) {
|
|
return value < 2;
|
|
};
|
|
expect(par(object)).toBe(true);
|
|
});
|
|
});
|