diff --git a/__tests__/lib/infer/type.js b/__tests__/lib/infer/type.js index 4832d9d1c..c7da9b312 100644 --- a/__tests__/lib/infer/type.js +++ b/__tests__/lib/infer/type.js @@ -40,6 +40,28 @@ test('inferType', function() { type: 'TypeApplication' }); + expect(evaluate('/** */' + "type V = {a:number,'b':string}").type).toEqual({ + fields: [ + { + key: 'a', + type: 'FieldType', + value: { + name: 'number', + type: 'NameExpression' + } + }, + { + key: 'b', + type: 'FieldType', + value: { + name: 'string', + type: 'NameExpression' + } + } + ], + type: 'RecordType' + }); + expect(evaluate('/** */' + 'type V = Array').type).toEqual({ applications: [ {