Javascript SDK of WoopChain protocol
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
sdk/packages/harmony-crypto/test/rlp.test.ts

21 lines
471 B

/**
* @packageDocumentation
* @ignore
*/
import * as rlp from '../src/rlp';
import cases from './fixtures/rlpcoder.json';
describe('rlp', () => {
it('should test rlp encoder', () => {
cases.forEach((testcase) => {
expect(rlp.encode(testcase.decoded)).toEqual(testcase.encoded);
});
});
it('should test rlp decoder', () => {
cases.forEach((testcase) => {
expect(rlp.decode(testcase.encoded)).toEqual(testcase.decoded);
});
});
});