summaryrefslogtreecommitdiff
path: root/tests/unit/cron_test.ts
diff options
context:
space:
mode:
authorIan Bull <irbull@eclipsesource.com>2024-09-04 23:27:58 -0700
committerGitHub <noreply@github.com>2024-09-05 08:27:58 +0200
commit17b5e98b822dc23407a0292dcf61e624fbf2a4b1 (patch)
tree3c421242aea0e0c7b88b1e4766a2fae3127a88f7 /tests/unit/cron_test.ts
parentacd01eb2b41e37a480943f79cfa28fc220c4baca (diff)
refactor(ext/cron): align error messages (#25300)
Aligns the error messages in the cron extension to be in-line with the Deno style guide. https://github.com/denoland/deno/issues/25269
Diffstat (limited to 'tests/unit/cron_test.ts')
-rw-r--r--tests/unit/cron_test.ts10
1 files changed, 5 insertions, 5 deletions
diff --git a/tests/unit/cron_test.ts b/tests/unit/cron_test.ts
index 02573a898..5f14f6c78 100644
--- a/tests/unit/cron_test.ts
+++ b/tests/unit/cron_test.ts
@@ -15,7 +15,7 @@ Deno.test(function noNameTest() {
// @ts-ignore test
() => Deno.cron(),
TypeError,
- "Deno.cron requires a unique name",
+ "Cannot create cron job, a unique name is required: received 'undefined'",
);
});
@@ -24,7 +24,7 @@ Deno.test(function noSchedule() {
// @ts-ignore test
() => Deno.cron("foo"),
TypeError,
- "Deno.cron requires a valid schedule",
+ "Cannot create cron job, a schedule is required: received 'undefined'",
);
});
@@ -33,7 +33,7 @@ Deno.test(function noHandler() {
// @ts-ignore test
() => Deno.cron("foo", "*/1 * * * *"),
TypeError,
- "Deno.cron requires a handler",
+ "Cannot create cron job: a handler is required",
);
});
@@ -66,7 +66,7 @@ Deno.test(function invalidNameTest() {
() => {},
),
TypeError,
- "Cron name is too long",
+ "Cron name cannot exceed 64 characters: current length 70",
);
});
@@ -388,7 +388,7 @@ Deno.test("error on two handlers", () => {
Deno.cron("abc", "* * * * *", () => {}, () => {});
},
TypeError,
- "Deno.cron requires a single handler",
+ "Cannot create cron job, a single handler is required: two handlers were specified",
);
});