Skip to content

Commit 32ad109

Browse files
committed
Replace ecdsa2022 w/ jcs2019Proofs.
1 parent 7d23c20 commit 32ad109

File tree

1 file changed

+16
-16
lines changed

1 file changed

+16
-16
lines changed

tests/suites/algorithms-jcs.js

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -38,12 +38,12 @@ export function ecdsaJcs2019Algorithms() {
3838
const [issuer] = endpoints;
3939
let issuedVc;
4040
let proofs;
41-
let ecdsa2022Proofs = [];
41+
let jcs2019Proofs = [];
4242
before(async function() {
4343
issuedVc = await createInitialVc({issuer, vc: validCredential});
4444
proofs = getProofs(issuedVc);
4545
if(proofs?.length) {
46-
ecdsa2022Proofs = proofs.filter(
46+
jcs2019Proofs = proofs.filter(
4747
proof => proof?.cryptosuite === cryptosuite);
4848
}
4949
});
@@ -52,7 +52,7 @@ export function ecdsaJcs2019Algorithms() {
5252
should.exist(issuedVc, 'Expected issuer to have issued a ' +
5353
'credential.');
5454
should.exist(proofs, 'Expected credential to have a proof.');
55-
ecdsa2022Proofs.length.should.be.gte(1, 'Expected at least one ' +
55+
jcs2019Proofs.length.should.be.gte(1, 'Expected at least one ' +
5656
'ecdsa-jcs-2019 cryptosuite.');
5757
};
5858
it('The transformation options MUST contain a type identifier ' +
@@ -61,7 +61,7 @@ export function ecdsaJcs2019Algorithms() {
6161
async function() {
6262
this.test.link = 'https://www.w3.org/TR/vc-di-ecdsa/#transformation-ecdsa-jcs-2019';
6363
assertBefore();
64-
for(const proof of ecdsa2022Proofs) {
64+
for(const proof of jcs2019Proofs) {
6565
should.exist(proof.type, 'Expected a type identifier on ' +
6666
'the proof.');
6767
should.exist(proof.cryptosuite,
@@ -73,7 +73,7 @@ export function ecdsaJcs2019Algorithms() {
7373
async function() {
7474
this.test.link = 'https://www.w3.org/TR/vc-di-ecdsa/#transformation-ecdsa-jcs-2019';
7575
assertBefore();
76-
for(const proof of ecdsa2022Proofs) {
76+
for(const proof of jcs2019Proofs) {
7777
should.exist(proof?.proofValue,
7878
'Expected proofValue to exist.');
7979
isValidUtf8(proof.proofValue).should.equal(
@@ -89,7 +89,7 @@ export function ecdsaJcs2019Algorithms() {
8989
async function() {
9090
this.test.link = 'https://www.w3.org/TR/vc-di-ecdsa/#transformation-ecdsa-jcs-2019';
9191
assertBefore();
92-
for(const proof of ecdsa2022Proofs) {
92+
for(const proof of jcs2019Proofs) {
9393
should.exist(proof.type,
9494
'Expected a type identifier on the proof.');
9595
should.exist(proof.cryptosuite,
@@ -116,12 +116,12 @@ export function ecdsaJcs2019Algorithms() {
116116
const [issuer] = endpoints;
117117
let issuedVc;
118118
let proofs;
119-
let ecdsa2022Proofs = [];
119+
let jcs2019Proofs = [];
120120
before(async function() {
121121
issuedVc = await createInitialVc({issuer, vc: validCredential});
122122
proofs = getProofs(issuedVc);
123123
if(proofs?.length) {
124-
ecdsa2022Proofs = proofs.filter(
124+
jcs2019Proofs = proofs.filter(
125125
proof => proof?.cryptosuite === cryptosuite);
126126
}
127127
});
@@ -130,7 +130,7 @@ export function ecdsaJcs2019Algorithms() {
130130
should.exist(issuedVc, 'Expected issuer to have issued a ' +
131131
'credential.');
132132
should.exist(proofs, 'Expected credential to have a proof.');
133-
ecdsa2022Proofs.length.should.be.gte(1, 'Expected at least one ' +
133+
jcs2019Proofs.length.should.be.gte(1, 'Expected at least one ' +
134134
'ecdsa-jcs-2019 cryptosuite.');
135135
};
136136
it('The proof options MUST contain a type identifier for the ' +
@@ -139,7 +139,7 @@ export function ecdsaJcs2019Algorithms() {
139139
async function() {
140140
this.test.link = 'https://www.w3.org/TR/vc-di-ecdsa/#proof-configuration-ecdsa-jcs-2019';
141141
assertBefore();
142-
for(const proof of ecdsa2022Proofs) {
142+
for(const proof of jcs2019Proofs) {
143143
should.exist(proof.type,
144144
'Expected a type identifier on the proof.');
145145
should.exist(proof.cryptosuite,
@@ -153,7 +153,7 @@ export function ecdsaJcs2019Algorithms() {
153153
async function() {
154154
this.test.link = 'https://www.w3.org/TR/vc-di-ecdsa/#proof-configuration-ecdsa-jcs-2019';
155155
assertBefore();
156-
for(const proof of ecdsa2022Proofs) {
156+
for(const proof of jcs2019Proofs) {
157157
should.exist(proof.type,
158158
'Expected a type identifier on the proof.');
159159
should.exist(proof.cryptosuite,
@@ -169,7 +169,7 @@ export function ecdsaJcs2019Algorithms() {
169169
'SHOULD convey an error type of PROOF_GENERATION_ERROR.',
170170
async function() {
171171
this.test.link = 'https://www.w3.org/TR/vc-di-ecdsa/#proof-configuration-ecdsa-jcs-2019';
172-
for(const proof of ecdsa2022Proofs) {
172+
for(const proof of jcs2019Proofs) {
173173
if(proof?.created) {
174174
isValidDatetime(proof.created).should.equal(
175175
true,
@@ -194,12 +194,12 @@ export function ecdsaJcs2019Algorithms() {
194194
const [issuer] = endpoints;
195195
let issuedVc;
196196
let proofs;
197-
let ecdsa2022Proofs = [];
197+
let jcs2019Proofs = [];
198198
before(async function() {
199199
issuedVc = await createInitialVc({issuer, vc: validCredential});
200200
proofs = getProofs(issuedVc);
201201
if(proofs?.length) {
202-
ecdsa2022Proofs = proofs.filter(
202+
jcs2019Proofs = proofs.filter(
203203
proof => proof?.cryptosuite === cryptosuite);
204204
}
205205
});
@@ -208,7 +208,7 @@ export function ecdsaJcs2019Algorithms() {
208208
should.exist(issuedVc, 'Expected issuer to have issued a ' +
209209
'credential.');
210210
should.exist(proofs, 'Expected credential to have a proof.');
211-
ecdsa2022Proofs.length.should.be.gte(1, 'Expected at least one ' +
211+
jcs2019Proofs.length.should.be.gte(1, 'Expected at least one ' +
212212
'ecdsa-jcs-2019 cryptosuite.');
213213
};
214214
it('The proof options MUST contain a type identifier for the ' +
@@ -217,7 +217,7 @@ export function ecdsaJcs2019Algorithms() {
217217
async function() {
218218
this.test.link = 'https://www.w3.org/TR/vc-di-ecdsa/#proof-serialization-ecdsa-jcs-2019';
219219
assertBefore();
220-
for(const proof of ecdsa2022Proofs) {
220+
for(const proof of jcs2019Proofs) {
221221
should.exist(proof.type,
222222
'Expected a type identifier on the proof.');
223223
}

0 commit comments

Comments
 (0)