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

Function getMode

testing/_snapshot_utils.ts:61–72  ·  view source on GitHub ↗
(options: SnapshotOptions)

Source from the content-addressed store, hash-verified

59 * Get the snapshot mode.
60 */
61export function getMode(options: SnapshotOptions) {
62 if (options.mode) {
63 return options.mode;
64 } else if (_mode) {
65 return _mode;
66 } else {
67 _mode = Deno.args.some((arg) => arg === "--update" || arg === "-u")
68 ? "update"
69 : "assert";
70 return _mode;
71 }
72}
73
74/**
75 * Return `true` when snapshot mode is `update`.

Callers 1

getIsUpdateFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected