summaryrefslogtreecommitdiff
path: root/cli/tests/subdir
diff options
context:
space:
mode:
Diffstat (limited to 'cli/tests/subdir')
-rw-r--r--cli/tests/subdir/bench_worker.ts4
-rw-r--r--cli/tests/subdir/nested_worker.js8
-rw-r--r--cli/tests/subdir/sibling_worker.js2
-rw-r--r--cli/tests/subdir/test_worker.js4
-rw-r--r--cli/tests/subdir/test_worker.ts2
-rw-r--r--cli/tests/subdir/test_worker_basic.js4
6 files changed, 12 insertions, 12 deletions
diff --git a/cli/tests/subdir/bench_worker.ts b/cli/tests/subdir/bench_worker.ts
index 619a35fa2..7e85eed03 100644
--- a/cli/tests/subdir/bench_worker.ts
+++ b/cli/tests/subdir/bench_worker.ts
@@ -1,10 +1,10 @@
-onmessage = function(e): void {
+onmessage = function (e): void {
const { cmdId, action, data } = e.data;
switch (action) {
case 0: // Static response
postMessage({
cmdId,
- data: "HTTP/1.1 200 OK\r\nContent-Length: 12\r\n\r\nHello World\n"
+ data: "HTTP/1.1 200 OK\r\nContent-Length: 12\r\n\r\nHello World\n",
});
break;
case 1: // Respond with request data
diff --git a/cli/tests/subdir/nested_worker.js b/cli/tests/subdir/nested_worker.js
index a4eed723a..f5ac23a19 100644
--- a/cli/tests/subdir/nested_worker.js
+++ b/cli/tests/subdir/nested_worker.js
@@ -1,18 +1,18 @@
// Specifier should be resolved relative to current file
const jsWorker = new Worker("./sibling_worker.js", {
type: "module",
- name: "sibling"
+ name: "sibling",
});
-jsWorker.onerror = _e => {
+jsWorker.onerror = (_e) => {
postMessage({ type: "error" });
};
-jsWorker.onmessage = e => {
+jsWorker.onmessage = (e) => {
postMessage({ type: "msg", text: e });
close();
};
-onmessage = function(e) {
+onmessage = function (e) {
jsWorker.postMessage(e.data);
};
diff --git a/cli/tests/subdir/sibling_worker.js b/cli/tests/subdir/sibling_worker.js
index 0e91141ce..99707e5d6 100644
--- a/cli/tests/subdir/sibling_worker.js
+++ b/cli/tests/subdir/sibling_worker.js
@@ -1,4 +1,4 @@
-onmessage = e => {
+onmessage = (e) => {
postMessage(e.data);
close();
};
diff --git a/cli/tests/subdir/test_worker.js b/cli/tests/subdir/test_worker.js
index 9c1e555b5..02cd86eac 100644
--- a/cli/tests/subdir/test_worker.js
+++ b/cli/tests/subdir/test_worker.js
@@ -4,7 +4,7 @@ if (self.name !== "jsWorker") {
throw Error(`Bad worker name: ${self.name}, expected jsWorker`);
}
-onmessage = function(e) {
+onmessage = function (e) {
if (thrown === false) {
thrown = true;
throw new SyntaxError("[test error]");
@@ -14,6 +14,6 @@ onmessage = function(e) {
close();
};
-onerror = function() {
+onerror = function () {
return false;
};
diff --git a/cli/tests/subdir/test_worker.ts b/cli/tests/subdir/test_worker.ts
index 1f924c073..ca79dcfe4 100644
--- a/cli/tests/subdir/test_worker.ts
+++ b/cli/tests/subdir/test_worker.ts
@@ -2,7 +2,7 @@ if (self.name !== "tsWorker") {
throw Error(`Invalid worker name: ${self.name}, expected tsWorker`);
}
-onmessage = function(e): void {
+onmessage = function (e): void {
postMessage(e.data);
close();
};
diff --git a/cli/tests/subdir/test_worker_basic.js b/cli/tests/subdir/test_worker_basic.js
index aef1658c0..aea360872 100644
--- a/cli/tests/subdir/test_worker_basic.js
+++ b/cli/tests/subdir/test_worker_basic.js
@@ -5,11 +5,11 @@ if (self.name !== "jsWorker") {
throw Error(`Bad worker name: ${self.name}, expected jsWorker`);
}
-onmessage = function(e) {
+onmessage = function (e) {
postMessage(e.data);
close();
};
-onerror = function() {
+onerror = function () {
return false;
};