Skip to content

Commit

Permalink
Remove unnecessary test helpers.
Browse files Browse the repository at this point in the history
  • Loading branch information
dlongley committed Aug 11, 2024
1 parent f92c46c commit edd8b50
Show file tree
Hide file tree
Showing 4 changed files with 1 addition and 21 deletions.
5 changes: 0 additions & 5 deletions tests/decode.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -658,8 +658,3 @@ describe('cborld decode', () => {
function _hexToUint8Array(hex) {
return new Uint8Array(hex.match(/.{1,2}/g).map(byte => parseInt(byte, 16)));
}

// eslint-disable-next-line no-unused-vars
function _uint8ArrayToHex(bytes) {
return [...bytes].map(d => d.toString(16).padStart(2, '0')).join('');
}
5 changes: 0 additions & 5 deletions tests/encode.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -809,8 +809,3 @@ describe('cborld encode', () => {
'd90601a30019800018661a6070bb5f186882016c746573742e6578616d706c65');
});
});

// eslint-disable-next-line no-unused-vars
function _uint8ArrayToHex(bytes) {
return [...bytes].map(d => d.toString(16).padStart(2, '0')).join('');
}
5 changes: 0 additions & 5 deletions tests/roundtrip.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -1529,8 +1529,3 @@ describe('cborld round trip', () => {
});
});
});

// eslint-disable-next-line no-unused-vars
function _uint8ArrayToHex(bytes) {
return [...bytes].map(d => d.toString(16).padStart(2, '0')).join('');
}
7 changes: 1 addition & 6 deletions tests/test.legacy.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -1616,7 +1616,7 @@ describe('legacy cborld', () => {
//diagnose: console.log
});

//console.log(d.name, _uint8ArrayToHex(cborldBytes));
//console.log(d.name, Buffer.from(cborldBytes).toString('hex'));

expect(cborldBytes).equalBytes(d.cborldHex);

Expand All @@ -1635,8 +1635,3 @@ describe('legacy cborld', () => {
function _hexToUint8Array(hex) {
return new Uint8Array(hex.match(/.{1,2}/g).map(byte => parseInt(byte, 16)));
}

// eslint-disable-next-line no-unused-vars
function _uint8ArrayToHex(bytes) {
return [...bytes].map(d => d.toString(16).padStart(2, '0')).join('');
}

0 comments on commit edd8b50

Please sign in to comment.