BTreeSet only has single sub (#2114)
This commit is contained in:
@@ -17,6 +17,7 @@ function extractTypes (types: string[]): any[] {
|
||||
case TypeDefInfo.Plain:
|
||||
return decoded.type;
|
||||
|
||||
case TypeDefInfo.BTreeSet:
|
||||
case TypeDefInfo.Compact:
|
||||
case TypeDefInfo.Option:
|
||||
case TypeDefInfo.Vec:
|
||||
@@ -24,7 +25,7 @@ function extractTypes (types: string[]): any[] {
|
||||
return extractTypes([(decoded.sub as TypeDef).type]);
|
||||
|
||||
case TypeDefInfo.BTreeMap:
|
||||
case TypeDefInfo.BTreeSet:
|
||||
case TypeDefInfo.HashMap:
|
||||
case TypeDefInfo.Result:
|
||||
case TypeDefInfo.Tuple:
|
||||
return extractTypes((decoded.sub as TypeDef[]).map((sub): string => sub.type));
|
||||
|
||||
@@ -24,7 +24,7 @@ describe('BTreeMap', (): void => {
|
||||
).toEqual('{}');
|
||||
});
|
||||
|
||||
it('decodes reusing instanciated inputs', (): void => {
|
||||
it('decodes reusing instantiated inputs', (): void => {
|
||||
const key = new Text(registry, 'foo');
|
||||
const val = new Text(registry, 'bar');
|
||||
|
||||
|
||||
@@ -40,7 +40,7 @@ describe('BTreeSet', (): void => {
|
||||
testDecode('Uint8Array', mockU32SetUint8Array, mockU32SetString);
|
||||
});
|
||||
|
||||
describe('encoding muple values', (): void => {
|
||||
describe('encoding multiple values', (): void => {
|
||||
const testEncode = (to: CodecTo, expected: any): void =>
|
||||
it(`can encode ${to}`, (): void => {
|
||||
const s = new BTreeSet(registry, U32, mockU32Set);
|
||||
@@ -61,7 +61,7 @@ describe('BTreeSet', (): void => {
|
||||
).toEqual('[]');
|
||||
});
|
||||
|
||||
it('decodes reusing instanciated inputs', (): void => {
|
||||
it('decodes reusing instantiated inputs', (): void => {
|
||||
const foo = new Text(registry, 'bar');
|
||||
|
||||
expect(
|
||||
|
||||
Reference in New Issue
Block a user