validator icon indicating copy to clipboard operation
validator copied to clipboard

Declarative usage of`in:A,B` does not validate `B`

Open christoph-kluge opened this issue 11 months ago • 0 comments

@ozziest it seems that #70 and #71 didn't solved the issue described in #67.

I checked quickly my test-case in #67 and I realised that the test-case didn't represented the bug correctly. The declarative way only validates the first option correctly but does not include all other options. Here's the updated test, which validates that the bug still exists.

  it("should be able to work with spread-string options", async () => {
-    expect(isIn("A", ...["A,B,B"])).toBe(true);
-    expect(isIn("A", ...["A","B","C"])).toBe(true);
+    expect(isIn("B", ...["A,B,B"])).toBe(true);
+    expect(isIn("B", ...["A","B","C"])).toBe(true);
  });

christoph-kluge avatar Feb 04 '25 07:02 christoph-kluge