summaryrefslogtreecommitdiff
path: root/cli/tests
diff options
context:
space:
mode:
Diffstat (limited to 'cli/tests')
-rw-r--r--cli/tests/bundle.test.out6
-rw-r--r--cli/tests/bundle/fixture01.out4
-rw-r--r--cli/tests/bundle/fixture02.out14
-rw-r--r--cli/tests/bundle/fixture03.out2
-rw-r--r--cli/tests/bundle/fixture08.out6
-rw-r--r--cli/tests/bundle/fixture09.out19
-rw-r--r--cli/tests/bundle/fixture10.out5
-rw-r--r--cli/tests/bundle/fixture11.out20
-rw-r--r--cli/tests/bundle/fixture14.out31
-rw-r--r--cli/tests/integration_tests.rs2
-rw-r--r--cli/tests/unit/webgpu_test.ts3
11 files changed, 34 insertions, 78 deletions
diff --git a/cli/tests/bundle.test.out b/cli/tests/bundle.test.out
index b21e53b42..030c09295 100644
--- a/cli/tests/bundle.test.out
+++ b/cli/tests/bundle.test.out
@@ -11,17 +11,17 @@ function printHello2() {
function returnsHi1() {
return "Hi";
}
-export { returnsHi1 as returnsHi };
function returnsFoo21() {
return returnsFoo();
}
-export { returnsFoo21 as returnsFoo2 };
function printHello31() {
printHello2();
}
-export { printHello31 as printHello3 };
function throwsError1() {
throw Error("exception from mod1");
}
+export { returnsHi1 as returnsHi };
+export { returnsFoo21 as returnsFoo2 };
+export { printHello31 as printHello3 };
export { throwsError1 as throwsError };
diff --git a/cli/tests/bundle/fixture01.out b/cli/tests/bundle/fixture01.out
index c6d2bd6d7..a825140b7 100644
--- a/cli/tests/bundle/fixture01.out
+++ b/cli/tests/bundle/fixture01.out
@@ -1,7 +1,7 @@
+const a = "a";
const mod = function() {
- const a = "a";
return {
- a
+ a: a
};
}();
console.log(mod);
diff --git a/cli/tests/bundle/fixture02.out b/cli/tests/bundle/fixture02.out
index f831aac2e..b3544182b 100644
--- a/cli/tests/bundle/fixture02.out
+++ b/cli/tests/bundle/fixture02.out
@@ -1,16 +1,12 @@
-const b = "b";
-console.log(b);
+const c = "c";
+class C {
+}
const mod = function() {
- const c = "c";
- const c1 = c;
- class C {
- }
- const __default = C;
- const __default1 = C;
return {
c: c,
default: 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 93659f4d9..524e77abb 100644
--- a/cli/tests/bundle/fixture03.out
+++ b/cli/tests/bundle/fixture03.out
@@ -1,5 +1,5 @@
const a = "a";
const d = {
- a: a
+ a
};
console.log(d);
diff --git a/cli/tests/bundle/fixture08.out b/cli/tests/bundle/fixture08.out
index 7ddb20077..bfe40aa37 100644
--- a/cli/tests/bundle/fixture08.out
+++ b/cli/tests/bundle/fixture08.out
@@ -1,9 +1,7 @@
+const a1 = "a";
const mod = function() {
- const a = "a";
- const a1 = a;
return {
- a: a
+ a: a1
};
}();
-const a = mod;
export { mod as a };
diff --git a/cli/tests/bundle/fixture09.out b/cli/tests/bundle/fixture09.out
index e7396f493..e06cc92de 100644
--- a/cli/tests/bundle/fixture09.out
+++ b/cli/tests/bundle/fixture09.out
@@ -1,20 +1,19 @@
+function a3(...d) {
+ return d.join(" ");
+}
const mod = function() {
- function a(...d) {
- return d.join(" ");
- }
return {
- a
+ a: a3
};
}();
+function a1(...d) {
+ return d.join("/");
+}
const mod1 = function() {
- function a(...d) {
- return d.join("/");
- }
return {
- a
+ a: a1
};
}();
const k = globalThis.value ? mod : mod1;
const { a: a2 , } = k;
-const a1 = a2;
-export { a1 as a };
+export { a2 as a };
diff --git a/cli/tests/bundle/fixture10.out b/cli/tests/bundle/fixture10.out
index 776aac1ae..5491e5e7f 100644
--- a/cli/tests/bundle/fixture10.out
+++ b/cli/tests/bundle/fixture10.out
@@ -1,6 +1,5 @@
const a = "a";
-const a1 = a;
const o = {
};
-const { a: a2 = a1 } = o;
-console.log(a2);
+const { a: a1 = a } = o;
+console.log(a1);
diff --git a/cli/tests/bundle/fixture11.out b/cli/tests/bundle/fixture11.out
index 876eb45ac..d143e8723 100644
--- a/cli/tests/bundle/fixture11.out
+++ b/cli/tests/bundle/fixture11.out
@@ -1,25 +1,21 @@
function a() {
console.log("a");
}
-const a1 = a;
-var O3;
+var O1;
(function(O1) {
O1[O1["A"] = 0] = "A";
O1[O1["B"] = 1] = "B";
O1[O1["C"] = 2] = "C";
-})(O3 || (O3 = {
+})(O1 || (O1 = {
}));
-const O1 = O3;
-const a2 = a1;
-const O2 = O1;
-export { O2 as O };
+export { O1 as O };
class A {
#a;
#c;
constructor(o = {
}){
- const { a: a3 = a2 , c , } = o;
- this.#a = a3;
+ const { a: a1 = a , c , } = o;
+ this.#a = a1;
this.#c = c;
}
a() {
@@ -29,6 +25,6 @@ class A {
console.log(this.#c);
}
}
-const a4 = new A();
-a4.a();
-a4.c();
+const a2 = new A();
+a2.a();
+a2.c();
diff --git a/cli/tests/bundle/fixture14.out b/cli/tests/bundle/fixture14.out
index 2534a7015..392bb6478 100644
--- a/cli/tests/bundle/fixture14.out
+++ b/cli/tests/bundle/fixture14.out
@@ -1,31 +1,2 @@
-const mod = function() {
- const mod1 = [];
- return {
- mod: mod1
- };
-}();
+const mod = [];
console.log(mod);
-const mod1 = function() {
- const c = [];
- const c1 = c;
- return {
- c: c
- };
-}();
-const c = mod1;
-const mod2 = function() {
- const b = [];
- const b1 = b;
- return {
- b: b
- };
-}();
-const b = mod2;
-const mod3 = function() {
- const a = [];
- const a1 = a;
- return {
- a: a
- };
-}();
-const a = mod3;
diff --git a/cli/tests/integration_tests.rs b/cli/tests/integration_tests.rs
index d07fe1b22..022bd5572 100644
--- a/cli/tests/integration_tests.rs
+++ b/cli/tests/integration_tests.rs
@@ -1473,7 +1473,7 @@ mod integration {
assert!(std::str::from_utf8(&output.stdout)
.unwrap()
.trim()
- .ends_with("f1\nf2"));
+ .ends_with("f2\nf1"));
assert_eq!(output.stderr, b"");
}
diff --git a/cli/tests/unit/webgpu_test.ts b/cli/tests/unit/webgpu_test.ts
index 628a3c8db..d40851dfa 100644
--- a/cli/tests/unit/webgpu_test.ts
+++ b/cli/tests/unit/webgpu_test.ts
@@ -1,6 +1,3 @@
-// TODO(lucacasonato): remove when GPUBufferUsage and friends are added to dlint
-// deno-lint-ignore-file no-undef
-
import { assert, assertEquals, unitTest } from "./test_util.ts";
let isCI: boolean;