mirror of
https://github.com/denoland/deno.git
synced 2025-03-03 17:34:47 -05:00
Run 'make fmt'
This commit is contained in:
parent
93654831fe
commit
0132a4d11d
4 changed files with 11 additions and 12 deletions
|
@ -25,7 +25,8 @@ function stringify(ctx: ConsoleContext, value: any): string {
|
|||
case "symbol":
|
||||
return String(value);
|
||||
case "function":
|
||||
if (value.name && value.name !== "anonymous") { // from MDN spec
|
||||
if (value.name && value.name !== "anonymous") {
|
||||
// from MDN spec
|
||||
return `[Function: ${value.name}]`;
|
||||
}
|
||||
return "[Function]";
|
||||
|
|
8
tests.ts
8
tests.ts
|
@ -90,7 +90,7 @@ test(function tests_console_stringify_circular() {
|
|||
arrowFunc: () => {},
|
||||
extendedClass: new Extended(),
|
||||
nFunc: new Function(),
|
||||
extendedCstr: Extended,
|
||||
extendedCstr: Extended
|
||||
};
|
||||
|
||||
const circularObj = {
|
||||
|
@ -103,7 +103,7 @@ test(function tests_console_stringify_circular() {
|
|||
nested: nestedObj,
|
||||
emptyObj: {},
|
||||
arr: [1, "s", false, null, nestedObj],
|
||||
baseClass: new Base(),
|
||||
baseClass: new Base()
|
||||
};
|
||||
|
||||
nestedObj.o = circularObj;
|
||||
|
@ -121,8 +121,6 @@ test(function tests_console_stringify_circular() {
|
|||
console.log(JSON);
|
||||
console.log(console);
|
||||
} catch {
|
||||
throw new Error(
|
||||
"Expected no crash on circular object"
|
||||
);
|
||||
throw new Error("Expected no crash on circular object");
|
||||
}
|
||||
});
|
||||
|
|
Loading…
Add table
Reference in a new issue