diff --git a/test/utilities/mapFlowTypes.js b/test/utilities/mapFlowTypes.js index 4b4a3ac..97b6d7d 100644 --- a/test/utilities/mapFlowTypes.js +++ b/test/utilities/mapFlowTypes.js @@ -14,11 +14,15 @@ const knownTypes = { }; test('correctly maps known types', (t) => { - for (const [databaseType, flowType] of Object.entries(knownTypes)) { + const databaseTypeNames = Object.keys(knownTypes); + + for (const databaseTypeName of databaseTypeNames) { + const flowType = knownTypes[databaseTypeName]; + if (typeof flowType !== 'string') { throw new TypeError(); } - t.true(mapFlowType(databaseType) === flowType, flowType); + t.true(mapFlowType(databaseTypeName) === flowType, flowType); } });