summaryrefslogtreecommitdiff
path: root/cli/tests
diff options
context:
space:
mode:
Diffstat (limited to 'cli/tests')
-rw-r--r--cli/tests/bundle/fixture01.out4
-rw-r--r--cli/tests/bundle/fixture02.out13
-rw-r--r--cli/tests/bundle/fixture03.out4
-rw-r--r--cli/tests/bundle/fixture05.out3
-rw-r--r--cli/tests/bundle/fixture08.out8
-rw-r--r--cli/tests/bundle/fixture09.out11
-rw-r--r--cli/tests/bundle/fixture10.out5
-rw-r--r--cli/tests/bundle/fixture11.out8
-rw-r--r--cli/tests/bundle/fixture14.out50
-rw-r--r--cli/tests/lint/file2.ts2
10 files changed, 62 insertions, 46 deletions
diff --git a/cli/tests/bundle/fixture01.out b/cli/tests/bundle/fixture01.out
index e29d0d38a..c6d2bd6d7 100644
--- a/cli/tests/bundle/fixture01.out
+++ b/cli/tests/bundle/fixture01.out
@@ -1,7 +1,7 @@
-const a = function() {
+const mod = function() {
const a = "a";
return {
a
};
}();
-console.log(a);
+console.log(mod);
diff --git a/cli/tests/bundle/fixture02.out b/cli/tests/bundle/fixture02.out
index 41880e73d..a00289183 100644
--- a/cli/tests/bundle/fixture02.out
+++ b/cli/tests/bundle/fixture02.out
@@ -1,11 +1,14 @@
-const c = function() {
- const c1 = "c";
+const mod = function() {
+ const c = "c";
+ const c1 = c;
class C {
}
return {
- c: c1,
+ c,
default: C
};
}();
-console.log("b");
-console.log(c);
+const c = mod;
+const b = "b";
+console.log(b);
+console.log(mod);
diff --git a/cli/tests/bundle/fixture03.out b/cli/tests/bundle/fixture03.out
index d4c79e2ec..27d0a7a13 100644
--- a/cli/tests/bundle/fixture03.out
+++ b/cli/tests/bundle/fixture03.out
@@ -1,4 +1,6 @@
+const a = "a";
+const a1 = a;
const d = {
- a: "a"
+ a: a
};
console.log(d);
diff --git a/cli/tests/bundle/fixture05.out b/cli/tests/bundle/fixture05.out
index 7b2a34601..1289cca5f 100644
--- a/cli/tests/bundle/fixture05.out
+++ b/cli/tests/bundle/fixture05.out
@@ -1 +1,2 @@
-console.log("a");
+const a = "a";
+console.log(a);
diff --git a/cli/tests/bundle/fixture08.out b/cli/tests/bundle/fixture08.out
index f9435ab2a..01d6befb4 100644
--- a/cli/tests/bundle/fixture08.out
+++ b/cli/tests/bundle/fixture08.out
@@ -1,7 +1,9 @@
-const a = function() {
- const a1 = "a";
+const mod = function() {
+ const a = "a";
+ const a1 = a;
return {
- a: a1
+ a
};
}();
+const a = mod;
export { a };
diff --git a/cli/tests/bundle/fixture09.out b/cli/tests/bundle/fixture09.out
index 7f9646946..e7396f493 100644
--- a/cli/tests/bundle/fixture09.out
+++ b/cli/tests/bundle/fixture09.out
@@ -1,4 +1,4 @@
-const _i = function() {
+const mod = function() {
function a(...d) {
return d.join(" ");
}
@@ -6,7 +6,7 @@ const _i = function() {
a
};
}();
-const _j = function() {
+const mod1 = function() {
function a(...d) {
return d.join("/");
}
@@ -14,6 +14,7 @@ const _j = function() {
a
};
}();
-const k = globalThis.value ? _i : _j;
-const { a , } = k;
-export { a };
+const k = globalThis.value ? mod : mod1;
+const { a: a2 , } = k;
+const a1 = a2;
+export { a1 as a };
diff --git a/cli/tests/bundle/fixture10.out b/cli/tests/bundle/fixture10.out
index 7436722b5..5491e5e7f 100644
--- a/cli/tests/bundle/fixture10.out
+++ b/cli/tests/bundle/fixture10.out
@@ -1,4 +1,5 @@
+const a = "a";
const o = {
};
-const { a ="a" } = o;
-console.log(a);
+const { a: a1 = a } = o;
+console.log(a1);
diff --git a/cli/tests/bundle/fixture11.out b/cli/tests/bundle/fixture11.out
index 526693ef2..c09f0cac9 100644
--- a/cli/tests/bundle/fixture11.out
+++ b/cli/tests/bundle/fixture11.out
@@ -1,15 +1,13 @@
function a() {
console.log("a");
}
-var O;
+var O2;
(function(O1) {
O1[O1["A"] = 0] = "A";
O1[O1["B"] = 1] = "B";
O1[O1["C"] = 2] = "C";
-})(O || (O = {
+})(O2 || (O2 = {
}));
-const O1 = O;
-export { O1 as O };
class A {
#a;
#c;
@@ -29,3 +27,5 @@ class A {
const a2 = new A();
a2.a();
a2.c();
+const O1 = O2;
+export { O1 as O };
diff --git a/cli/tests/bundle/fixture14.out b/cli/tests/bundle/fixture14.out
index c1a14cebe..cb0b4834f 100644
--- a/cli/tests/bundle/fixture14.out
+++ b/cli/tests/bundle/fixture14.out
@@ -1,25 +1,31 @@
-const lib = function() {
- const a = function() {
- const a1 = [];
- return {
- a: a1
- };
- }();
- const b = function() {
- const b1 = [];
- return {
- b: b1
- };
- }();
- const c = function() {
- const c1 = [];
- return {
- c: c1
- };
- }();
- const mod = [];
+const mod = function() {
+ const a = [];
+ const a1 = a;
return {
- mod
+ a
};
}();
-console.log(lib);
+const a = mod;
+const mod1 = function() {
+ const b = [];
+ const b1 = b;
+ return {
+ b
+ };
+}();
+const b = mod1;
+const mod2 = function() {
+ const c = [];
+ const c1 = c;
+ return {
+ c
+ };
+}();
+const c = mod2;
+const mod3 = function() {
+ const mod4 = [];
+ return {
+ mod: mod4
+ };
+}();
+console.log(mod3);
diff --git a/cli/tests/lint/file2.ts b/cli/tests/lint/file2.ts
index 10c709ba2..a2be5c5e0 100644
--- a/cli/tests/lint/file2.ts
+++ b/cli/tests/lint/file2.ts
@@ -2,5 +2,5 @@ try {
await Deno.open("./some/file.txt");
} catch (e) {}
-// deno-lint-ignore no-explicit-any require-await
+// deno-lint-ignore no-explicit-any
function foo(): any {}