Skip to content

Commit

Permalink
Add beforeEach & fix unsafeProxy.
Browse files Browse the repository at this point in the history
  • Loading branch information
aljones15 committed Nov 11, 2024
1 parent c975ab0 commit 318fb92
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions tests/suites/algorithms.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,12 @@ export function commonAlgorithms({
mandatoryPointers
});
});
beforeEach(function() {
this.currentTest.cell = {
rowId: this.currentTest.title,
columnId: this.currentTest.parent.title
};
});
it('When generating ECDSA signatures, the signature value MUST be ' +
'expressed according to section 7 of [RFC4754] (sometimes referred ' +
'to as the IEEE P1363 format) and encoded according to the specific ' +
Expand Down Expand Up @@ -254,7 +260,7 @@ function unsafeProxy(suite) {
get(target, prop) {
if(prop === 'canonize') {
return function(doc, options) {
return suite._cryptosuite.canonize(doc, {...options, safe: false});
return target.canonize(doc, {...options, safe: false});
};
}
return Reflect.get(...arguments);
Expand All @@ -265,7 +271,7 @@ function unsafeProxy(suite) {
get(target, prop) {
if(prop === 'canonize') {
return function(doc, options) {
return suite.canonize(doc, {...options, safe: false});
return target.canonize(doc, {...options, safe: false});
};
}
return Reflect.get(...arguments);
Expand Down

0 comments on commit 318fb92

Please sign in to comment.