fix: correct package scope name
This commit is contained in:
@@ -56,6 +56,23 @@ describe("NonEmptyString", () => {
|
||||
).success,
|
||||
).toBe(false));
|
||||
|
||||
it("trims leading and trailing whitespace from valid strings", {
|
||||
repeats: 10,
|
||||
}, () => {
|
||||
const content = faker.string.alphanumeric({ length: { min: 1, max: 255 } });
|
||||
|
||||
expect(NonEmptyString.safeDecode(` \n\t${content}\t\n `)).toStrictEqual({
|
||||
data: content,
|
||||
success: true,
|
||||
});
|
||||
});
|
||||
|
||||
it.each([".", "hello world", "déjà vu", "こんにちは", "🚀"])(
|
||||
"accepts non-empty non-alphanumeric content: %s",
|
||||
(content) =>
|
||||
expect(NonEmptyString.safeDecode(content).success).toBe(true),
|
||||
);
|
||||
|
||||
it("accepts strings with at least 1 non-whitespsace character", () =>
|
||||
expect(
|
||||
NonEmptyString.safeDecode(
|
||||
|
||||
Reference in New Issue
Block a user