mirror of
https://github.com/Blah-IM/typescript-core.git
synced 2025-06-23 16:31:08 +00:00
fix: test setup by generating keypair within test function
This commit is contained in:
parent
850b5b3042
commit
5e6a51e172
1 changed files with 3 additions and 1 deletions
|
@ -4,9 +4,11 @@ import { z } from "zod";
|
|||
import { BlahPublicKey } from "./publicKey.ts";
|
||||
import type { SignOrVerifyOptions } from "./signAndVerify.ts";
|
||||
|
||||
const keypair = await BlahKeyPair.generate();
|
||||
let keypair: BlahKeyPair;
|
||||
|
||||
Deno.test("sign & verify payload", async () => {
|
||||
keypair = await BlahKeyPair.generate();
|
||||
|
||||
const payload = { foo: "bar", baz: 123 };
|
||||
const signedPayload = await keypair.signPayload(payload);
|
||||
const verifiedPayload = await keypair.publicKey.verifyPayload(
|
||||
|
|
Loading…
Add table
Reference in a new issue