A packet the way a recipe would have produced it, without a server.
(overrides: Partial<FactPacket> = {})
| 23 | |
| 24 | /** A packet the way a recipe would have produced it, without a server. */ |
| 25 | function packetOf(overrides: Partial<FactPacket> = {}): FactPacket { |
| 26 | const question = overrides.question ?? 'Wer ruft createUser?'; |
| 27 | const classification = classifyQuestion(question); |
| 28 | return { |
| 29 | klass: overrides.klass ?? classification.klass, |
| 30 | question, |
| 31 | classification, |
| 32 | depth: 1, |
| 33 | subject: CREATE_USER_IR.symbol, |
| 34 | subjectIr: CREATE_USER_IR, |
| 35 | ambiguous: [], |
| 36 | neighbours: [], |
| 37 | routes: [], |
| 38 | entryPoints: [], |
| 39 | observed: [], |
| 40 | sources: [], |
| 41 | notes: [], |
| 42 | ...overrides, |
| 43 | }; |
| 44 | } |
| 45 | |
| 46 | function caller(name: string, line: number): NeighbourFact { |
| 47 | return { |
no test coverage detected