aboutsummaryrefslogtreecommitdiff
path: root/test/js/third_party/jsonwebtoken/decoding.test.js
diff options
context:
space:
mode:
Diffstat (limited to 'test/js/third_party/jsonwebtoken/decoding.test.js')
-rw-r--r--test/js/third_party/jsonwebtoken/decoding.test.js9
1 files changed, 9 insertions, 0 deletions
diff --git a/test/js/third_party/jsonwebtoken/decoding.test.js b/test/js/third_party/jsonwebtoken/decoding.test.js
new file mode 100644
index 000000000..617c7f295
--- /dev/null
+++ b/test/js/third_party/jsonwebtoken/decoding.test.js
@@ -0,0 +1,9 @@
+import jwt from "jsonwebtoken";
+import { expect, describe, it } from "bun:test";
+
+describe("decoding", function () {
+ it("should not crash when decoding a null token", function () {
+ var decoded = jwt.decode("null");
+ expect(decoded).toEqual(null);
+ });
+});