MCPcopy Create free account
hub / github.com/denoland/std / getOptions

Function getOptions

testing/_snapshot_utils.ts:81–91  ·  view source on GitHub ↗
(
  msgOrOpts?: string | T,
)

Source from the content-addressed store, hash-verified

79}
80
81export function getOptions<T>(
82 msgOrOpts?: string | T,
83): T {
84 if (msgOrOpts === undefined) return {} as T;
85
86 if (typeof msgOrOpts === "object" && msgOrOpts !== null) {
87 return msgOrOpts;
88 }
89
90 return { msg: msgOrOpts } as T;
91}
92
93export function getSnapshotNotMatchMessage(
94 actualSnapshot: string,

Callers 2

assertInlineSnapshotFunction · 0.90
assertSnapshotFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected