summaryrefslogtreecommitdiff
path: root/cli/tests
diff options
context:
space:
mode:
authorGasman <90539473+MarybethGasman@users.noreply.github.com>2023-02-05 07:34:36 +0800
committerGitHub <noreply@github.com>2023-02-05 00:34:36 +0100
commit0eb5be9a1204f959d3daac8cd7b1b342320970fd (patch)
tree3d84f243bb238964de727ff1f9a91361676336e0 /cli/tests
parent1e75e5ecc72fd6caf1ee3d2c98ea1662e141f55b (diff)
fix(ext/console): log class for class constructor (#17615)
Co-authored-by: tannal <tannal.cn@gmail.com>
Diffstat (limited to 'cli/tests')
-rw-r--r--cli/tests/integration/repl_tests.rs4
-rw-r--r--cli/tests/testdata/npm/esm_import_cjs_default/main.out12
-rw-r--r--cli/tests/testdata/npm/tarball_with_global_header/main.out2
-rw-r--r--cli/tests/testdata/run/070_location.ts.out2
-rw-r--r--cli/tests/testdata/run/071_location_unset.ts.out2
-rw-r--r--cli/tests/testdata/run/top_level_await/loop.out4
-rw-r--r--cli/tests/unit/console_test.ts2
7 files changed, 14 insertions, 14 deletions
diff --git a/cli/tests/integration/repl_tests.rs b/cli/tests/integration/repl_tests.rs
index f69f71398..43e601739 100644
--- a/cli/tests/integration/repl_tests.rs
+++ b/cli/tests/integration/repl_tests.rs
@@ -375,7 +375,7 @@ fn typescript_decorators() {
Some(vec![("NO_COLOR".to_owned(), "1".to_owned())]),
false,
);
- assert_ends_with!(out, "undefined\n[Function: Test]\n2\n");
+ assert_ends_with!(out, "undefined\n[Class: Test]\n2\n");
assert!(err.is_empty());
}
@@ -943,7 +943,7 @@ fn npm_packages() {
);
assert_contains!(out, "Module {");
- assert_contains!(out, "Chalk: [Function: Chalk],");
+ assert_contains!(out, "Chalk: [Class: Chalk],");
assert!(err.is_empty());
}
diff --git a/cli/tests/testdata/npm/esm_import_cjs_default/main.out b/cli/tests/testdata/npm/esm_import_cjs_default/main.out
index 4b73328f3..2e90049d8 100644
--- a/cli/tests/testdata/npm/esm_import_cjs_default/main.out
+++ b/cli/tests/testdata/npm/esm_import_cjs_default/main.out
@@ -1,11 +1,11 @@
Node esm importing node cjs
===========================
-{ default: [Function], named: [Function], MyClass: [Function: MyClass] }
+{ default: [Function], named: [Function], MyClass: [Class: MyClass] }
{ default: [Function], named: [Function] }
Module {
- MyClass: [Function: MyClass],
+ MyClass: [Class: MyClass],
__esModule: true,
- default: { default: [Function], named: [Function], MyClass: [Function: MyClass] },
+ default: { default: [Function], named: [Function], MyClass: [Class: MyClass] },
named: [Function]
}
Module {
@@ -17,11 +17,11 @@ Module {
static method
Deno esm importing node cjs
===========================
-{ default: [Function], named: [Function], MyClass: [Function: MyClass] }
+{ default: [Function], named: [Function], MyClass: [Class: MyClass] }
Module {
- MyClass: [Function: MyClass],
+ MyClass: [Class: MyClass],
__esModule: true,
- default: { default: [Function], named: [Function], MyClass: [Function: MyClass] },
+ default: { default: [Function], named: [Function], MyClass: [Class: MyClass] },
named: [Function]
}
===========================
diff --git a/cli/tests/testdata/npm/tarball_with_global_header/main.out b/cli/tests/testdata/npm/tarball_with_global_header/main.out
index 2f309499e..caf351e2e 100644
--- a/cli/tests/testdata/npm/tarball_with_global_header/main.out
+++ b/cli/tests/testdata/npm/tarball_with_global_header/main.out
@@ -1 +1 @@
-[Function: Client]
+[Class: Client]
diff --git a/cli/tests/testdata/run/070_location.ts.out b/cli/tests/testdata/run/070_location.ts.out
index 692d7c976..8b2f9e49d 100644
--- a/cli/tests/testdata/run/070_location.ts.out
+++ b/cli/tests/testdata/run/070_location.ts.out
@@ -1,4 +1,4 @@
-[WILDCARD][Function: Location]
+[WILDCARD][Class: Location]
Location {}
Location {
hash: "#bat",
diff --git a/cli/tests/testdata/run/071_location_unset.ts.out b/cli/tests/testdata/run/071_location_unset.ts.out
index 99f87a7fc..dc67c5578 100644
--- a/cli/tests/testdata/run/071_location_unset.ts.out
+++ b/cli/tests/testdata/run/071_location_unset.ts.out
@@ -1,4 +1,4 @@
-[WILDCARD][Function: Location]
+[WILDCARD][Class: Location]
Location {}
undefined
/bar
diff --git a/cli/tests/testdata/run/top_level_await/loop.out b/cli/tests/testdata/run/top_level_await/loop.out
index 70e621e45..7f72048c2 100644
--- a/cli/tests/testdata/run/top_level_await/loop.out
+++ b/cli/tests/testdata/run/top_level_await/loop.out
@@ -1,5 +1,5 @@
loading [WILDCARD]a.js
-loaded Module { default: [Function: Foo] }
+loaded Module { default: [Class: Foo] }
loading [WILDCARD]b.js
-loaded Module { default: [Function: Bar] }
+loaded Module { default: [Class: Bar] }
all loaded
diff --git a/cli/tests/unit/console_test.ts b/cli/tests/unit/console_test.ts
index 1abacc9ad..ccc8638d2 100644
--- a/cli/tests/unit/console_test.ts
+++ b/cli/tests/unit/console_test.ts
@@ -237,7 +237,7 @@ Deno.test(function consoleTestStringifyCircular() {
arrowFunc: [Function: arrowFunc],
extendedClass: Extended { a: 1, b: 2 },
nFunc: [Function],
- extendedCstr: [Function: Extended],
+ extendedCstr: [Class: Extended],
o: {
num: 2,
bool: false,