summaryrefslogtreecommitdiff
path: root/cli/tests
diff options
context:
space:
mode:
authorLuca Casonato <lucacasonato@yahoo.com>2021-01-26 17:00:40 +0100
committerGitHub <noreply@github.com>2021-01-26 17:00:40 +0100
commit40fc5f55ea582755d221a3445a2f5f388845bc23 (patch)
treebb9a8110ba797cb802a08643343c423abcd0b75c /cli/tests
parenteb30c6f510ba49fbabcd0121fde5159605eddd77 (diff)
chore: update crates (#9251)
Updates SWC, dprint, deno_lint, deno_doc, serde, and Tokio (to 1.1.0). Co-authored-by: Kitson Kelly <me@kitsonkelly.com> Co-authored-by: Bartek IwaƄczuk <biwanczuk@gmail.com>
Diffstat (limited to 'cli/tests')
-rw-r--r--cli/tests/bundle.test.out28
-rw-r--r--cli/tests/bundle/fixture02.out2
-rw-r--r--cli/tests/bundle/fixture06.out14
-rw-r--r--cli/tests/bundle/fixture08.out2
-rw-r--r--cli/tests/bundle/fixture09.out5
-rw-r--r--cli/tests/bundle/fixture10.out7
-rw-r--r--cli/tests/bundle/fixture11.out28
-rw-r--r--cli/tests/bundle/fixture15.out5
-rw-r--r--cli/tests/compiler_api_test.ts4
-rw-r--r--cli/tests/seed_random.js.out17
10 files changed, 54 insertions, 58 deletions
diff --git a/cli/tests/bundle.test.out b/cli/tests/bundle.test.out
index 155430c99..b21e53b42 100644
--- a/cli/tests/bundle.test.out
+++ b/cli/tests/bundle.test.out
@@ -1,31 +1,27 @@
[WILDCARD]
-function returnsHi() {
- return "Hi";
+function printHello() {
+ console.log("Hello");
}
function returnsFoo() {
return "Foo";
}
-function printHello() {
- console.log("Hello");
-}
function printHello2() {
printHello();
}
-function returnsFoo2() {
+function returnsHi1() {
+ return "Hi";
+}
+export { returnsHi1 as returnsHi };
+function returnsFoo21() {
return returnsFoo();
}
-function printHello3() {
+export { returnsFoo21 as returnsFoo2 };
+function printHello31() {
printHello2();
}
-function throwsError() {
+export { printHello31 as printHello3 };
+function throwsError1() {
throw Error("exception from mod1");
}
-const returnsHi1 = returnsHi;
-const returnsFoo21 = returnsFoo2;
-const printHello31 = printHello3;
-const throwsError1 = throwsError;
-export { returnsHi as returnsHi };
-export { returnsFoo2 as returnsFoo2 };
-export { printHello3 as printHello3 };
-export { throwsError as throwsError };
+export { throwsError1 as throwsError };
diff --git a/cli/tests/bundle/fixture02.out b/cli/tests/bundle/fixture02.out
index b14fc143b..f831aac2e 100644
--- a/cli/tests/bundle/fixture02.out
+++ b/cli/tests/bundle/fixture02.out
@@ -2,9 +2,9 @@ const b = "b";
console.log(b);
const mod = function() {
const c = "c";
+ const c1 = c;
class C {
}
- const c1 = c;
const __default = C;
const __default1 = C;
return {
diff --git a/cli/tests/bundle/fixture06.out b/cli/tests/bundle/fixture06.out
index 3c583c56e..47288d5e4 100644
--- a/cli/tests/bundle/fixture06.out
+++ b/cli/tests/bundle/fixture06.out
@@ -1,12 +1,12 @@
const importMeta = {
- url: "file:///tests/fixture06.ts",
- main: import.meta.main
-};
-const importMeta1 = {
url: "file:///tests/subdir/f.ts",
main: false
};
-const isMain = importMeta1.main;
-const modUrl = importMeta1.url;
+const isMain = importMeta.main;
+const modUrl = importMeta.url;
+const importMeta1 = {
+ url: "file:///tests/fixture06.ts",
+ main: import.meta.main
+};
console.log(isMain, modUrl);
-console.log(importMeta.main, importMeta.url);
+console.log(importMeta1.main, importMeta1.url);
diff --git a/cli/tests/bundle/fixture08.out b/cli/tests/bundle/fixture08.out
index 0ab646840..7ddb20077 100644
--- a/cli/tests/bundle/fixture08.out
+++ b/cli/tests/bundle/fixture08.out
@@ -6,4 +6,4 @@ const mod = function() {
};
}();
const a = mod;
-export { a };
+export { mod as a };
diff --git a/cli/tests/bundle/fixture09.out b/cli/tests/bundle/fixture09.out
index 73031ef02..e7396f493 100644
--- a/cli/tests/bundle/fixture09.out
+++ b/cli/tests/bundle/fixture09.out
@@ -15,7 +15,6 @@ const mod1 = function() {
};
}();
const k = globalThis.value ? mod : mod1;
-const { a , } = k;
-const a1 = a;
-const a2 = a;
+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 209c19612..776aac1ae 100644
--- a/cli/tests/bundle/fixture10.out
+++ b/cli/tests/bundle/fixture10.out
@@ -1,5 +1,6 @@
+const a = "a";
+const a1 = a;
const o = {
};
-const a = "a";
-const { a: a1 = a } = o;
-console.log(a1);
+const { a: a2 = a1 } = o;
+console.log(a2);
diff --git a/cli/tests/bundle/fixture11.out b/cli/tests/bundle/fixture11.out
index 9c22c3b09..876eb45ac 100644
--- a/cli/tests/bundle/fixture11.out
+++ b/cli/tests/bundle/fixture11.out
@@ -1,22 +1,25 @@
-var O2;
+function a() {
+ console.log("a");
+}
+const a1 = a;
+var O3;
(function(O1) {
O1[O1["A"] = 0] = "A";
O1[O1["B"] = 1] = "B";
O1[O1["C"] = 2] = "C";
-})(O2 || (O2 = {
+})(O3 || (O3 = {
}));
-function a() {
- console.log("a");
-}
-const O1 = O2;
-export { O1 as O };
+const O1 = O3;
+const a2 = a1;
+const O2 = O1;
+export { O2 as O };
class A {
#a;
#c;
constructor(o = {
}){
- const { a: a1 = a , c , } = o;
- this.#a = a1;
+ const { a: a3 = a2 , c , } = o;
+ this.#a = a3;
this.#c = c;
}
a() {
@@ -26,7 +29,6 @@ class A {
console.log(this.#c);
}
}
-const a2 = new A();
-a2.a();
-a2.c();
-const O3 = O2;
+const a4 = new A();
+a4.a();
+a4.c();
diff --git a/cli/tests/bundle/fixture15.out b/cli/tests/bundle/fixture15.out
index 408d8464f..dc72fdeff 100644
--- a/cli/tests/bundle/fixture15.out
+++ b/cli/tests/bundle/fixture15.out
@@ -1,5 +1,4 @@
-function getIndex(c) {
+function getIndex1(c) {
return "\x00\r\n\x85\u2028\u2029".indexOf(c);
}
-const getIndex1 = getIndex;
-export { getIndex as getIndex };
+export { getIndex1 as getIndex };
diff --git a/cli/tests/compiler_api_test.ts b/cli/tests/compiler_api_test.ts
index 98685f467..17c02b0e5 100644
--- a/cli/tests/compiler_api_test.ts
+++ b/cli/tests/compiler_api_test.ts
@@ -189,7 +189,7 @@ Deno.test({
assert(!ignoredOptions);
assertEquals(stats.length, 12);
assertEquals(Object.keys(files), ["deno:///bundle.js"]);
- assert(files["deno:///bundle.js"].includes(`const bar = "bar"`));
+ assert(files["deno:///bundle.js"].includes(`const bar1 = "bar"`));
},
});
@@ -227,7 +227,7 @@ Deno.test({
assert(!ignoredOptions);
assertEquals(stats.length, 12);
assertEquals(Object.keys(files), ["deno:///bundle.js"]);
- assert(files["deno:///bundle.js"].includes(`const bar = "bar"`));
+ assert(files["deno:///bundle.js"].includes(`const bar1 = "bar"`));
},
});
diff --git a/cli/tests/seed_random.js.out b/cli/tests/seed_random.js.out
index 2b5551c83..4d1ebd081 100644
--- a/cli/tests/seed_random.js.out
+++ b/cli/tests/seed_random.js.out
@@ -9,15 +9,14 @@
0.5950178237266042
0.22440633214343908
Uint8Array(32) [
- 116, 125, 169, 69, 106, 231, 99,
- 39, 148, 188, 211, 41, 46, 211,
- 236, 141, 55, 10, 214, 63, 118,
- 230, 218, 249, 125, 161, 137, 110,
- 214, 36, 159, 154
+ 153, 221, 127, 193, 173, 88, 77, 155,
+ 23, 66, 117, 239, 157, 231, 189, 160,
+ 79, 198, 30, 56, 137, 159, 220, 226,
+ 47, 211, 26, 73, 243, 252, 71, 214
]
Uint8Array(32) [
- 248, 21, 21, 9, 41, 0, 71, 124,
- 244, 209, 252, 151, 7, 10, 168, 250,
- 84, 170, 243, 140, 53, 47, 99, 212,
- 18, 146, 68, 48, 66, 222, 67, 112
+ 18, 98, 66, 131, 76, 87, 93, 76,
+ 205, 81, 250, 112, 129, 119, 92, 9,
+ 116, 99, 5, 171, 8, 137, 132, 79,
+ 255, 9, 194, 1, 138, 85, 72, 189
]