mirror of
https://github.com/denoland/deno.git
synced 2024-12-22 15:24:46 -05:00
Format
This commit is contained in:
parent
941e27d8c1
commit
ab952e3340
2 changed files with 6 additions and 3 deletions
|
@ -67,7 +67,7 @@ test(function consoleTestStringifyCircular() {
|
||||||
};
|
};
|
||||||
|
|
||||||
nestedObj.o = circularObj;
|
nestedObj.o = circularObj;
|
||||||
// tslint:disable-next-line:max-line-length
|
// tslint:disable-next-line:max-line-length
|
||||||
const nestedObjExpected = `{ num: 1, bool: true, str: "a", method: [Function: method], asyncMethod: [AsyncFunction: asyncMethod], generatorMethod: [GeneratorFunction: generatorMethod], un: undefined, nu: null, arrowFunc: [Function: arrowFunc], extendedClass: Extended { a: 1, b: 2 }, nFunc: [Function], extendedCstr: [Function: Extended], o: { num: 2, bool: false, str: "b", method: [Function: method], un: undefined, nu: null, nested: [Circular], emptyObj: [object], arr: [object], baseClass: [object] } }`;
|
const nestedObjExpected = `{ num: 1, bool: true, str: "a", method: [Function: method], asyncMethod: [AsyncFunction: asyncMethod], generatorMethod: [GeneratorFunction: generatorMethod], un: undefined, nu: null, arrowFunc: [Function: arrowFunc], extendedClass: Extended { a: 1, b: 2 }, nFunc: [Function], extendedCstr: [Function: Extended], o: { num: 2, bool: false, str: "b", method: [Function: method], un: undefined, nu: null, nested: [Circular], emptyObj: [object], arr: [object], baseClass: [object] } }`;
|
||||||
|
|
||||||
assertEqual(stringify(1), "1");
|
assertEqual(stringify(1), "1");
|
||||||
|
@ -94,7 +94,7 @@ test(function consoleTestStringifyCircular() {
|
||||||
});
|
});
|
||||||
|
|
||||||
test(function consoleTestStringifyWithDepth() {
|
test(function consoleTestStringifyWithDepth() {
|
||||||
// tslint:disable-next-line:no-any
|
// tslint:disable-next-line:no-any
|
||||||
const nestedObj: any = { a: { b: { c: { d: { e: { f: 42 } } } } } };
|
const nestedObj: any = { a: { b: { c: { d: { e: { f: 42 } } } } } };
|
||||||
assertEqual(
|
assertEqual(
|
||||||
stringifyArgs([nestedObj], { depth: 3 }),
|
stringifyArgs([nestedObj], { depth: 3 }),
|
||||||
|
|
|
@ -19,4 +19,7 @@ run([
|
||||||
])
|
])
|
||||||
|
|
||||||
run(["node", tslint, "-p", ".", "--exclude", "**/gen/**/*.ts"])
|
run(["node", tslint, "-p", ".", "--exclude", "**/gen/**/*.ts"])
|
||||||
run(["node", tslint, "./js/**/*_test.ts", "./tests/**/*.ts", "--exclude", "**/gen/**/*.ts"])
|
run([
|
||||||
|
"node", tslint, "./js/**/*_test.ts", "./tests/**/*.ts", "--exclude",
|
||||||
|
"**/gen/**/*.ts"
|
||||||
|
])
|
||||||
|
|
Loading…
Reference in a new issue