UNPKG

z-deduper

Version:

This library will allow you to build a Custom Zapier deduper for your advanced polling triggers use cases in your Zapier app.

19 lines 739 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); const utils_1 = require("./utils"); describe("Utils", () => { describe("generateKey", () => { it("should generate a UUID from a string", () => { const key = utils_1.generateKey("zap_id_1"); expect(key).toEqual("74a49e99-b72f-51ec-8aba-ae1a6e8d1ba9"); }); }); describe("toFixedLengthChunks", () => { it("should split a string into an array of fixed-length chunks", () => { const input = "abcdefghijk"; const chunks = utils_1.toFixedLengthChunks(input, 4); expect(chunks).toEqual(["abcd", "efgh", "ijk"]); }); }); }); //# sourceMappingURL=utils.spec.js.map