validator
validator copied to clipboard
Declarative usage of`in:A,B` does not validate `B`
@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);
});