(displayName, specPath)
| 1119 | }; |
| 1120 | |
| 1121 | const addDisplayName = (displayName, specPath) => { |
| 1122 | const props = specPath.properties; |
| 1123 | let safe = true; |
| 1124 | |
| 1125 | for (let i = 0; i < props.length; i++) { |
| 1126 | const prop = props[i]; |
| 1127 | if (prop.key.name === 'displayName') { |
| 1128 | safe = false; |
| 1129 | break; |
| 1130 | } |
| 1131 | } |
| 1132 | |
| 1133 | if (safe) { |
| 1134 | props.unshift(j.objectProperty(j.identifier('displayName'), j.stringLiteral(displayName))); |
| 1135 | } |
| 1136 | }; |
| 1137 | |
| 1138 | const fallbackToCreateClassModule = (classPath) => { |
| 1139 | const comments = getComments(classPath); |
no outgoing calls
no test coverage detected