mirror of
https://github.com/vector-im/element-call.git
synced 2026-08-20 20:49:20 +00:00
Don't redact null or undefined
This commit is contained in:
@@ -34,3 +34,25 @@ test("no redaction of unrelated keys", () => {
|
||||
bar: "foo",
|
||||
});
|
||||
});
|
||||
|
||||
test("no redaction of missing keys", () => {
|
||||
expect(
|
||||
redact({ foo: "bar" } as { foo: string; bar: string | undefined }, "bar"),
|
||||
).to.deep.equal({
|
||||
foo: "bar",
|
||||
});
|
||||
});
|
||||
|
||||
test("no redaction of null values", () => {
|
||||
expect(redact({ foo: "bar", bar: null }, "bar")).to.deep.equal({
|
||||
foo: "bar",
|
||||
bar: null,
|
||||
});
|
||||
});
|
||||
|
||||
test("no redaction of undefined values", () => {
|
||||
expect(redact({ foo: "bar", bar: undefined }, "bar")).to.deep.equal({
|
||||
foo: "bar",
|
||||
bar: undefined,
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user