(actual: readonly TestSubscriptionLog[])
| 167 | } |
| 168 | |
| 169 | expectSubscriptions(actual: readonly TestSubscriptionLog[]): SubscriptionExpectation { |
| 170 | const assertion: SubscriptionAssertion = { |
| 171 | kind: 'subscriptions', |
| 172 | actual, |
| 173 | matched: false, |
| 174 | evaluated: false, |
| 175 | }; |
| 176 | this.#assertions.push(assertion); |
| 177 | return { |
| 178 | toBe: (marbles: string | readonly string[]): void => { |
| 179 | this.#setMatcher(assertion); |
| 180 | assertion.marbles = marbles; |
| 181 | const diagrams = typeof marbles === 'string' ? [marbles] : marbles; |
| 182 | assertion.expected = diagrams |
| 183 | .map((diagram) => toSubscriptionLog(parseSubscriptionMarbles(diagram))) |
| 184 | .filter((log) => log.subscribedFrame !== Infinity); |
| 185 | }, |
| 186 | }; |
| 187 | } |
| 188 | |
| 189 | async evaluate(): Promise<void> { |
| 190 | for (const assertion of this.#assertions) { |
nothing calls this directly
no test coverage detected