(object?: Partial<T>)
| 92 | * This is a workaround for sinon not being able to stub interfaces. Interfaces are a TypeScript-only concept so this effectively allows us to stub interfaces by not providing the entire implementation but only what matters for the test. "What matters" is not type checked so you must be careful to stub everything you need, otherwise you should provide a default implementation instead if you do not know. |
| 93 | */ |
| 94 | export function stubInterface<T>(object?: Partial<T>): T { |
| 95 | return object ? (object as T) : ({} as T); |
| 96 | } |
| 97 | |
| 98 | /** Builds the sample binary module code. We need to do this because the source maps have absolute paths so they are not portable between machines, and while we could do deterministic with source maps, that's way more complicated and everywhere we build has dotnet already anyways */ |
| 99 | export function BuildBinaryModuleMock(): void { |
no outgoing calls