Skip to content

Commit

Permalink
Add cryptosuite property to mock suite.
Browse files Browse the repository at this point in the history
  • Loading branch information
aljones15 committed Sep 22, 2024
1 parent 2a0849c commit 792fe0b
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
8 changes: 3 additions & 5 deletions test/50-issue.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -70,11 +70,9 @@ function _runSuite({
verifiableCredential.proof.should.be.an('object');
should.not.exist(verifiableCredential.id, 'Expected no "vc.id".');
});
it('should throw an error on missing verificationMethod', async () => {
const suite = new Ed25519Signature2018({
// Note no key id or verificationMethod passed to suite
key: await Ed25519VerificationKey2018.generate()
});
it.only('should throw an error on missing verificationMethod', async () => {
console.log('issue', suites.issue);
console.log('derive', suites.derive);
let error;
try {
await vc.issue({
Expand Down
4 changes: 4 additions & 0 deletions test/mocks/suites.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ async function eddsaRdfc2022() {
keyPair,
keyType: 'Ed25519',
suiteName: 'eddsa-rdfc-2022',
cryptosuite: eddsaRdfc2020Cryptosuite,
suites: createDiSuites({
signer: keyPair.signer(),
cryptosuite: eddsaRdfc2020Cryptosuite
Expand All @@ -60,6 +61,7 @@ async function ecdsaRdfc2019() {
const keyDoc = await keyPair.export({publicKey: true});
registerKey({keyDoc});
return {
cryptosuite: ecdsaRdfc2019Cryptosuite,
keyDoc,
keyPair,
keyType: 'P-256',
Expand Down Expand Up @@ -107,6 +109,7 @@ async function bbs2023() {
const keyDoc = await keyPair.export({publicKey: true});
registerKey({keyDoc});
return {
cryptosuite: bbs2023Cryptosuite,
keyDoc,
keyPair,
suiteName: 'bbs-2023',
Expand Down Expand Up @@ -141,6 +144,7 @@ async function ed25519Sig2018() {
key: keyPair
});
return {
cryptosuite: Ed25519Signature2018,
keyDoc,
keyPair,
suite,
Expand Down

0 comments on commit 792fe0b

Please sign in to comment.