mirror of
https://github.com/denoland/std.git
synced 2024-11-21 20:50:22 +00:00
parent
8abff456f8
commit
d01e301921
@ -652,7 +652,8 @@ export class DumperState {
|
||||
} else if (this.sortKeys) {
|
||||
// Something is wrong
|
||||
throw new TypeError(
|
||||
'"sortKeys" must be a boolean or a function: received ${typeof this.sortKeys}',
|
||||
`"sortKeys" must be a boolean or a function: received ${typeof this
|
||||
.sortKeys}`,
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -553,6 +553,12 @@ Deno.test("stringify() changes the key order when the sortKeys option is specifi
|
||||
1.0.10: null
|
||||
`,
|
||||
);
|
||||
|
||||
assertThrows(
|
||||
() => stringify(object, { sortKeys: "true" as unknown as boolean }),
|
||||
TypeError,
|
||||
'"sortKeys" must be a boolean or a function: received string',
|
||||
);
|
||||
});
|
||||
|
||||
Deno.test("stringify() changes line wrap behavior based on lineWidth option", () => {
|
||||
|
Loading…
Reference in New Issue
Block a user