diff --git a/lib/sdk.test.ts b/lib/sdk.test.ts index bf45eb8..4a6d638 100644 --- a/lib/sdk.test.ts +++ b/lib/sdk.test.ts @@ -40,12 +40,12 @@ describe("cid", () => { test("accepts a custom variant", () => { expect(OptableSDK.cid("abc", 0)).toEqual("c:abc"); - for (let i = 1; i < 10; i++) { + for (let i = 1; i < 20; i++) { expect(OptableSDK.cid("abc", i)).toEqual(`c${i}:abc`); } expect(() => OptableSDK.cid("abc", -1)).toThrow(); - expect(() => OptableSDK.cid("abc", 10)).toThrow(); + expect(() => OptableSDK.cid("abc", 20)).toThrow(); expect(() => OptableSDK.cid("abc", "1" as unknown as number)).toThrow(); }); diff --git a/lib/sdk.ts b/lib/sdk.ts index dede87d..78755ea 100644 --- a/lib/sdk.ts +++ b/lib/sdk.ts @@ -128,7 +128,7 @@ class OptableSDK { throw new Error("Invalid ppid"); } - if (typeof variant !== "number" || isNaN(variant) || variant < 0 || variant > 9) { + if (typeof variant !== "number" || isNaN(variant) || variant < 0 || variant > 19) { throw new Error("Invalid variant"); }