import { getNodeName } from "./getNodeName"; describe("getNodeName()", () => { it("without slash should be the same", () => { const fullName = "name" const result = getNodeName(fullName); expect(result).toEqual(fullName); }); it("should be the part after the last slash", () => { const fullName = "main/flow/fork" const expected = "fork"; const result = getNodeName(fullName); expect(result).toEqual(expected); }); });