Skip to content

Commit

Permalink
Clone VC before modifying it (#49)
Browse files Browse the repository at this point in the history
* Clone VC before modifying it

* Use structuredClone
  • Loading branch information
sbihel authored Nov 5, 2024
1 parent 0900cc7 commit 62878d4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tests/20-algorithms.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ describe('Algorithm', function() {
'statements, a MALFORMED_VALUE_ERROR MUST be raised.',
async function() {
this.test.link = 'https://www.w3.org/TR/vc-bitstring-status-list/#:~:text=If%20an%20implementation%20of%20any%20of%20the%20algorithms%20in%20this%20section%20processes%20a%20property%20defined%20in%20Section%202.%20Data%20Model%20whose%20value%20is%20malformed%20due%20to%20not%20complying%20with%20associated%20%22MUST%22%20statements%2C%20a%20MALFORMED_VALUE_ERROR%20MUST%20be%20raised.';
const credential = require('./validVc.json');
const credential = structuredClone(require('./validVc.json'));

// Create a negative fixture
credential.statusEntry = {
Expand Down

0 comments on commit 62878d4

Please sign in to comment.