fix test
This commit is contained in:
parent
66c0942d7e
commit
7751d80056
1 changed files with 32 additions and 28 deletions
|
@ -33,7 +33,8 @@ async function getKeyPair(level: string) {
|
|||
}
|
||||
|
||||
describe('ap-request', () => {
|
||||
describe.each(['00', '01'])('createSignedPost with verify', async (level) => {
|
||||
describe.each(['00', '01'])('createSignedPost with verify', (level) => {
|
||||
test('pass', async () => {
|
||||
const keypair = await getKeyPair(level);
|
||||
const key = { keyId: 'x', 'privateKeyPem': keypair.privateKey };
|
||||
const url = 'https://example.com/inbox';
|
||||
|
@ -51,8 +52,10 @@ describe('ap-request', () => {
|
|||
const verify = verifyDraftSignature(parsed?.value, keypair.publicKey);
|
||||
assert.deepStrictEqual(verify, true);
|
||||
});
|
||||
});
|
||||
|
||||
describe.each(['00', '01'])('createSignedGet with verify', async (level) => {
|
||||
describe.each(['00', '01'])('createSignedGet with verify', (level) => {
|
||||
test('pass', async () => {
|
||||
const keypair = await getKeyPair(level);
|
||||
const key = { keyId: 'x', 'privateKeyPem': keypair.privateKey };
|
||||
const url = 'https://example.com/outbox';
|
||||
|
@ -69,3 +72,4 @@ describe('ap-request', () => {
|
|||
assert.deepStrictEqual(verify, true);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
|
Loading…
Reference in a new issue