wasm-rquickjs-cli 0.5.2

Tool for wrapping JavaScript modules as WebAssembly components using the QuickJS engine
test_r::enable!();

use crate::common::CompiledTest;
use camino::Utf8Path;
use test_r::{tag_suite, test_dep};

#[allow(dead_code)]
#[path = "../common/mod.rs"]
mod common;

mod abort_controller;
mod assert;
mod bigint_roundtrip;
mod buffer;
mod cjs_require;
mod console;
mod crypto;
mod diagnostics_channel;
mod diagnostics_channel_golem;
mod dns;
mod domain;
mod encoding;
mod engine_gc;
mod example1;
mod example2;
mod example3;
mod execution;
mod export_from_inner_package;
mod export_interface_name_collision;
mod fetch;
mod fs;
mod imports;
mod intl;
mod module_resolution;
mod node_http;
mod node_modules_apps;
mod npm_compat;
mod os;
mod p2_exported_resource;
mod path;
mod pollable;
mod process_backend;
mod process_warnings;
mod response_constructor;
mod response_static;
mod source_map;
mod sqlite;
mod stateful1;
mod streams;
mod structured_clone;
mod test_server_handle;
mod timeout;
mod toplevel_timer;
mod typescript_runtime;
mod url;
mod v8_stack_trace;
mod variant_list_roundtrip;
mod websocket;
mod xhr;
mod zlib;

// Tag suites into runtime groups for parallel CI matrix execution.
// Balance fixture preparation as well as execution: immutable component caches
// make most cases cheap, but each distinct generated fixture still needs a build.
tag_suite!(crypto, group1);
tag_suite!(example1, group1);
tag_suite!(example2, group1);
tag_suite!(bigint_roundtrip, group1);

tag_suite!(fetch, group2);
tag_suite!(imports, group2);

tag_suite!(abort_controller, group3);
tag_suite!(fs, group3);
tag_suite!(variant_list_roundtrip, group3);
tag_suite!(typescript_runtime, group3);

tag_suite!(xhr, group4);
tag_suite!(assert, group4);
tag_suite!(dns, group4);
tag_suite!(console, group4);
tag_suite!(encoding, group4);
tag_suite!(websocket, group4);

tag_suite!(response_constructor, group5);
tag_suite!(streams, group5);
tag_suite!(diagnostics_channel, group5);
tag_suite!(diagnostics_channel_golem, group5);
tag_suite!(pollable, group5);
tag_suite!(test_server_handle, group5);
tag_suite!(toplevel_timer, group5);

tag_suite!(path, group6);
tag_suite!(domain, group6);
tag_suite!(stateful1, group6);
tag_suite!(os, group6);
tag_suite!(process_warnings, group6);
tag_suite!(execution, group6);
tag_suite!(process_backend, group6);
tag_suite!(export_from_inner_package, group6);
tag_suite!(export_interface_name_collision, group6);
tag_suite!(example3, group6);
tag_suite!(p2_exported_resource, group6);
tag_suite!(sqlite, group6);

tag_suite!(url, group7);
tag_suite!(cjs_require, group7);
tag_suite!(module_resolution, group7);
tag_suite!(timeout, group7);
tag_suite!(buffer, group7);
tag_suite!(zlib, group7);

tag_suite!(response_static, group8);
tag_suite!(v8_stack_trace, group8);
tag_suite!(source_map, group8);
tag_suite!(structured_clone, group8);
tag_suite!(engine_gc, group8);
tag_suite!(node_http, group8);
tag_suite!(intl, group8);

tag_suite!(node_modules_apps, group9);
tag_suite!(npm_compat, group9);

#[test_dep(tagged_as = "example3", scope = Cloneable)]
async fn compiled_example3() -> CompiledTest {
    let path = Utf8Path::new("examples/runtime/example3");
    CompiledTest::new(path, true)
        .await
        .expect("Failed to compile example3")
}