The communications platform that puts data protection first.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
Rocket.Chat/apps/meteor/ee/server/lib/ldap/getNestedProp.spec.ts

23 lines
454 B

import { expect } from 'chai';
import { getNestedProp } from './getNestedProp';
describe('LDAP getNestedProp', () => {
it('should find shallow values', () => {
const customFields = {
foo: 'bar',
};
expect(getNestedProp(customFields, 'foo')).to.equal('bar');
});
it('should find deep values', () => {
const customFields = {
foo: {
bar: 'baz',
},
};
expect(getNestedProp(customFields, 'foo.bar')).to.equal('baz');
});
});