Skip to content

Commit f9286c6

Browse files
committed
fixup! test: update UTs for new methods
1 parent 3a5c710 commit f9286c6

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

tests/utils/string.utils.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ describe("StringUtils", () => {
133133
expect(toSnakeCase("Foo Bar test")).toBe("foo_bar_test");
134134
});
135135
it("handles leading/trailing spaces and dashes", () => {
136-
expect(toSnakeCase(" Foo-Bar ")).toBe("__foo_bar_");
136+
expect(toSnakeCase(" Foo-Bar ")).toBe("foo_bar");
137137
});
138138
it("returns empty string for empty input", () => {
139139
expect(toSnakeCase("")).toBe("");

tests/utils/validate.utils.test.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ import {
1414
isIPv4,
1515
isIPv6,
1616
isCreditCard,
17-
isJSON,
17+
isValidJSON,
1818
isArray,
1919
isBase64,
2020
hasRequiredProps,
@@ -242,14 +242,14 @@ describe("ValidateUtils", () => {
242242
});
243243
});
244244

245-
describe("isJSON", () => {
245+
describe("isValidJSON", () => {
246246
it("returns true for valid JSON strings", () => {
247-
expect(isJSON('{"a":1}')).toBe(true);
248-
expect(isJSON("[1,2,3]")).toBe(true);
247+
expect(isValidJSON('{"a":1}')).toBe(true);
248+
expect(isValidJSON("[1,2,3]")).toBe(true);
249249
});
250250
it("returns false for invalid JSON", () => {
251-
expect(isJSON("{a:1}")).toBe(false);
252-
expect(isJSON("not json")).toBe(false);
251+
expect(isValidJSON("{a:1}")).toBe(false);
252+
expect(isValidJSON("not json")).toBe(false);
253253
});
254254
});
255255

0 commit comments

Comments
 (0)