keycloak-scim/src/utils/isDefined.test.ts

15 lines
372 B
TypeScript
Raw Normal View History

import { isDefined } from "./isDefined";
describe("isDefined", () => {
it("detects defined values", () => {
expect(isDefined(0)).toBe(true);
expect(isDefined(false)).toBe(true);
expect(isDefined("")).toBe(true);
});
it("detects undefined values", () => {
expect(isDefined(undefined)).toBe(false);
expect(isDefined(null)).toBe(false);
});
});