summaryrefslogtreecommitdiff
path: root/cli/worker.rs
diff options
context:
space:
mode:
Diffstat (limited to 'cli/worker.rs')
-rw-r--r--cli/worker.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/cli/worker.rs b/cli/worker.rs
index 6ea17d915..990dd613a 100644
--- a/cli/worker.rs
+++ b/cli/worker.rs
@@ -263,7 +263,7 @@ mod tests {
#[test]
fn test_worker_messages() {
- tokio_util::init(|| {
+ tokio_util::run_in_task(|| {
let mut worker = create_test_worker();
let source = r#"
onmessage = function(e) {
@@ -314,7 +314,7 @@ mod tests {
#[test]
fn removed_from_resource_table_on_close() {
- tokio_util::init(|| {
+ tokio_util::run_in_task(|| {
let mut worker = create_test_worker();
worker
.execute("onmessage = () => { delete window.onmessage; }")
@@ -349,7 +349,7 @@ mod tests {
#[test]
fn execute_mod_resolve_error() {
- tokio_util::init(|| {
+ tokio_util::run_in_task(|| {
// "foo" is not a valid module specifier so this should return an error.
let mut worker = create_test_worker();
let module_specifier =
@@ -361,7 +361,7 @@ mod tests {
#[test]
fn execute_mod_002_hello() {
- tokio_util::init(|| {
+ tokio_util::run_in_task(|| {
// This assumes cwd is project root (an assumption made throughout the
// tests).
let mut worker = create_test_worker();