(body: string)
| 208 | |
| 209 | /** The names of the `calls` references extraction records for `body`, a method body's statements, sorted. */ |
| 210 | const callNames = (body: string): string[] => { |
| 211 | const source = `impl Svc {\n fn shapes(&self, x: &X) {\n${body}\n }\n}\n`; |
| 212 | return extractFromSource('shapes.rs', source, 'rust').unresolvedReferences |
| 213 | .filter((r) => r.referenceKind === 'calls') |
| 214 | .map((r) => r.referenceName) |
| 215 | .sort(); |
| 216 | }; |
| 217 | |
| 218 | it('of fields and method calls on `self` or a name, calls written `name()`', () => { |
| 219 | expect(callNames('self.services.store.put("a");')).toEqual(['self.services.store.put']); |
no test coverage detected