blob: 55b5d59ae21bda24edeb4e4c00ac24a86ef5525b (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
import jwt from "jsonwebtoken";
import { expect, describe, it } from "bun:test";
describe("non_object_values values", function () {
it("should work with string", function () {
var token = jwt.sign("hello", "123");
var result = jwt.verify(token, "123");
expect(result).toEqual("hello");
});
it("should work with number", function () {
var token = jwt.sign(123, "123");
var result = jwt.verify(token, "123");
expect(result).toEqual("123");
});
});
|