Skip to content

Commit

Permalink
Add tests from js-multiformats.
Browse files Browse the repository at this point in the history
  • Loading branch information
davidlehn committed Jun 6, 2024
1 parent 19cfdf1 commit df6cd7c
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions tests/api.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,20 @@ const specVectors = [

// misc tests
const miscVectors = [
// basic inputs
[[], ''],
['', ''],
['a', '72'],
['ab', '0EC'],
['abc', '0EC92'],
[[0x00], '00'],
[[0x00, 0x00], '000'],
// tests from https://github.com/multiformats/js-multiformats
['Decentralize everything!!', '4T8KPCG/DVKEXVDDLFD44O/EALEAWEZEDV1DX0'],
['yes mani !', 'RFF.OEB$D5/DZ24'],
['hello world', '+8D VD82EK4F.KEA2'],
['\x00yes mani !', 'V206$CL44CEC2DDX0'],
['\x00\x00yes mani !', '000RFF.OEB$D5/DZ24'],
];

// tests from README.md
Expand Down

0 comments on commit df6cd7c

Please sign in to comment.