refactor(http-recorder): tighten cassette safety, fix WS leaks + docs (#26730)
This commit is contained in:
parent
f6c8e35383
commit
b4fc5ef071
9 changed files with 177 additions and 95 deletions
|
|
@ -36,7 +36,7 @@ export const canonicalSnapshot = (snapshot: RequestSnapshot): string =>
|
|||
export const defaultMatcher: RequestMatcher = (incoming, recorded) =>
|
||||
canonicalSnapshot(incoming) === canonicalSnapshot(recorded)
|
||||
|
||||
const safeText = (value: unknown) => {
|
||||
export const safeText = (value: unknown) => {
|
||||
if (value === undefined) return "undefined"
|
||||
if (secretFindings(value).length > 0) return JSON.stringify(REDACTED)
|
||||
const text = JSON.stringify(value)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue