aboutsummaryrefslogtreecommitdiff
path: root/test/js/third_party/jsonwebtoken/expires_format.test.js
diff options
context:
space:
mode:
Diffstat (limited to 'test/js/third_party/jsonwebtoken/expires_format.test.js')
-rw-r--r--test/js/third_party/jsonwebtoken/expires_format.test.js10
1 files changed, 10 insertions, 0 deletions
diff --git a/test/js/third_party/jsonwebtoken/expires_format.test.js b/test/js/third_party/jsonwebtoken/expires_format.test.js
new file mode 100644
index 000000000..4d44243ab
--- /dev/null
+++ b/test/js/third_party/jsonwebtoken/expires_format.test.js
@@ -0,0 +1,10 @@
+import jwt from "jsonwebtoken";
+import { expect, describe, it } from "bun:test";
+
+describe("expires option", function () {
+ it("should throw on deprecated expiresInSeconds option", function () {
+ expect(function () {
+ jwt.sign({ foo: 123 }, "123", { expiresInSeconds: 5 });
+ }).toThrow('"expiresInSeconds" is not allowed');
+ });
+});