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.
16 lines
426 B
16 lines
426 B
5 years ago
|
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);
|
||
|
});
|
||
|
});
|
||
|
});
|