( options: InlineSnapshotOptions<T>, baseAssertSnapshot: typeof assertInlineSnapshot = assertInlineSnapshot, )
| 300 | * @returns {@linkcode assertInlineSnapshot} function with the given default options. |
| 301 | */ |
| 302 | export function createAssertInlineSnapshot<T>( |
| 303 | options: InlineSnapshotOptions<T>, |
| 304 | baseAssertSnapshot: typeof assertInlineSnapshot = assertInlineSnapshot, |
| 305 | ): typeof assertInlineSnapshot { |
| 306 | return function ( |
| 307 | actual: T, |
| 308 | expectedSnapshot: string, |
| 309 | messageOrOptions?: string | InlineSnapshotOptions<T>, |
| 310 | ) { |
| 311 | const mergedOptions: InlineSnapshotOptions<T> = { |
| 312 | ...options, |
| 313 | ...(typeof messageOrOptions === "string" |
| 314 | ? { msg: messageOrOptions } |
| 315 | : messageOrOptions), |
| 316 | }; |
| 317 | |
| 318 | baseAssertSnapshot(actual, expectedSnapshot, mergedOptions); |
| 319 | }; |
| 320 | } |
no outgoing calls
no test coverage detected