Skip to content

Commit c2d9d01

Browse files
committed
test[stringify]: clarify test messages
1 parent 123572a commit c2d9d01

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

_testutil.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,8 @@ export type Equal<X, Y> = (<T>() => T extends X ? 1 : 2) extends
5757
export function stringify(x: unknown): string {
5858
if (x instanceof Date) return `Date(${x.valueOf()})`;
5959
if (x instanceof Promise) return "Promise";
60+
if (x instanceof Set) return `Set(${stringify([...x.values()])})`;
61+
if (x instanceof Map) return `Map(${stringify([...x.entries()])})`;
6062
if (typeof x === "function") return x.toString();
6163
if (typeof x === "bigint") return `${x}n`;
6264
if (typeof x === "symbol") return x.toString();

0 commit comments

Comments
 (0)