type-fns
Version:
A set of types, type checks, and type guards for simpler, safer, and easier to read code.
16 lines • 617 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
const hasUuid_1 = require("./hasUuid");
describe('hasUuid', () => {
it('should return true if an object has an id', () => {
const obj = { uuid: 'uuid', name: 'bob' };
const itHasUuid = (0, hasUuid_1.hasUuid)(obj);
expect(itHasUuid).toEqual(true);
});
it('should return false if an object does not have an id', () => {
const obj = { name: 'bob' };
const itHasUuid = (0, hasUuid_1.hasUuid)(obj);
expect(itHasUuid).toEqual(false);
});
});
//# sourceMappingURL=hasUuid.test.js.map