Skip to content

Commit e40772d

Browse files
swimbirkir
authored andcommitted
fix(field-select): #354 return iterable value (#355)
1 parent 499090e commit e40772d

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

packages/prime-field-select/__tests__/index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,9 @@ describe('PrimeFieldSelect', () => {
3535
expect((await test.whereType(context))!.toString()).toEqual('Example_Arigato_Where');
3636
});
3737

38-
it('should resolve', async () => {
38+
it('should resolve & expect iterable value', async () => {
3939
const { resolve } = await test.outputType(context)!;
40-
expect(resolve({ a: 'foo' }, {}, {}, { fieldName: 'a' })).toEqual('Foo');
40+
expect(resolve({ a: 'foo' }, {}, {}, { fieldName: 'a' })).toEqual(['Foo']);
4141
expect(resolve({}, {}, {}, { fieldName: 'a' })).toBeFalsy();
4242
});
4343

packages/prime-field-select/src/PrimeFieldSelect.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ export class PrimeFieldSelect extends PrimeField {
6767
return root[info.fieldName];
6868
}
6969

70-
return value.value;
70+
return [value.value];
7171
},
7272
};
7373
}

0 commit comments

Comments
 (0)